File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 11let INDEXS = { }
2- let helper
32
43function escapeHtml ( string ) {
54 const entityMap = {
@@ -17,7 +16,7 @@ function escapeHtml(string) {
1716function getAllPaths ( router ) {
1817 const paths = [ ]
1918
20- helper . dom . findAll ( 'a :not([data-nosearch])') . forEach ( node => {
19+ document . querySelectorAll ( '.sidebar-nav a:not(.section-link) :not([data-nosearch])') . forEach ( node => {
2120 const href = node . href
2221 const originHref = node . getAttribute ( 'href' )
2322 const path = router . parse ( href ) . path
@@ -149,8 +148,6 @@ export function search(query) {
149148}
150149
151150export function init ( config , vm ) {
152- helper = Docsify
153-
154151 const isAuto = config . paths === 'auto'
155152 const isExpired = localStorage . getItem ( 'docsify.search.expires' ) < Date . now ( )
156153
@@ -171,7 +168,7 @@ export function init(config, vm) {
171168 return count ++
172169 }
173170
174- helper
171+ Docsify
175172 . get ( vm . router . getFile ( path ) , false , vm . config . requestHeaders )
176173 . then ( result => {
177174 INDEXS [ path ] = genIndex ( path , result , vm . router , config . depth )
You can’t perform that action at this time.
0 commit comments