fix: IE10 compatibility (#691)

* fix: IE10 compatibility

* chore: use built-in helper fn
fix/351
程康 6 years ago committed by cinwell.li
parent a72e7490c3
commit 4db8cd6abf
  1. 2
      src/core/render/compiler.js
  2. 2
      src/plugins/search/search.js

@ -241,7 +241,7 @@ export class Compiler {
}
href = router.toURL(href, null, router.getCurrentPath())
} else {
attrs += href.startsWith('mailto:') ? '' : ` target="${linkTarget}"`
attrs += href.indexOf('mailto:') === 0 ? '' : ` target="${linkTarget}"`
}
if (config.target) {

@ -16,7 +16,7 @@ function escapeHtml(string) {
function getAllPaths(router) {
const paths = []
document.querySelectorAll('.sidebar-nav a:not(.section-link):not([data-nosearch])').forEach(node => {
Docsify.dom.findAll('.sidebar-nav a:not(.section-link):not([data-nosearch])').forEach(node => {
const href = node.href
const originHref = node.getAttribute('href')
const path = router.parse(href).path

Loading…
Cancel
Save