docs(README): add search

This commit is contained in:
qingwei.li 2017-02-09 20:57:58 +08:00 committed by cinwell.li
commit e1da2f8a84
8 changed files with 99 additions and 17 deletions

View file

@ -43,7 +43,7 @@ export function init () {
}
renderer.link = function (href, title, text) {
if (!/:/.test(href)) {
href = `#/${href}`.replace(/\/\//g, '/')
href = `#/${href}`.replace(/\/+/g, '/')
}
return `<a href="${href}" title="${title || ''}">${text}</a>`