From 507d9e834c2867676c31b1bfb43517b79089f88a Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Fri, 24 Feb 2017 20:15:15 +0800 Subject: [PATCH] fix(search): dont search nameLink, fixed #102 --- README.md | 2 +- src/core/render/tpl.js | 2 +- src/plugins/search/search.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d9ae89d6a..b86951159 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ ## Features - No statically built html files -- Simple and lightweight (~14kB gzipped) +- Simple and lightweight (~16kB gzipped) - Smart full-text search plugin - Multiple themes - Useful plugin API diff --git a/src/core/render/tpl.js b/src/core/render/tpl.js index 2658c0bbd..6f7915945 100644 --- a/src/core/render/tpl.js +++ b/src/core/render/tpl.js @@ -31,7 +31,7 @@ export function main (config) { '' + '') diff --git a/src/plugins/search/search.js b/src/plugins/search/search.js index 9888d63a9..e7f5ee7a1 100644 --- a/src/plugins/search/search.js +++ b/src/plugins/search/search.js @@ -17,7 +17,7 @@ function escapeHtml (string) { function getAllPaths () { const paths = [] - helper.dom.findAll('a') + helper.dom.findAll('a:not(data-nosearch)') .map(node => { const href = node.href const originHref = node.getAttribute('href')