refactor(plugins): update search plugin

This commit is contained in:
qingwei.li 2017-02-19 10:47:47 +08:00 • committed by cinwell.li
commit 079bd00395
22 changed files with 348 additions and 393 deletions

View file

@ -5,7 +5,7 @@ import { genTree } from './gen-tree'
import { slugify, clearSlugCache } from './slugify'
import { emojify } from './emojify'
import { toURL, parse } from '../route/hash'
import { getBasePath, isResolvePath, getPath } from '../route/util'
import { getBasePath, isAbsolutePath, getPath } from '../route/util'
import { isFn, merge, cached } from '../util/core'
let markdownCompiler = marked
@ -87,7 +87,7 @@ renderer.image = function (href, title, text) {
let url = href
const titleHTML = title ? ` title="${title}"` : ''
if (!isResolvePath(href)) {
if (!isAbsolutePath(href)) {
url = getPath(contentBase, href)
}