8000 improve API source doc search links · vishalkakadiya/vuejs.org@f07e87c · GitHub
[go: up one dir, main page]

Skip to content

Commit f07e87c

Browse files
committed
improve API source doc search links
1 parent 6f1e3d7 commit f07e87c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

themes/vue/source/js/common.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727
}
2828

2929
function createSourceSearchPath(query) {
30-
return 'https://github.com/search?utf8=%E2%9C%93&q=repo%3Avuejs%2Fvue+extension%3Ajs+' + encodeURIComponent(query) + '+&type=Code'
30+
query = query
31+
.replace(/\([^\)]*?\)/g, '')
32+
.replace(/vm\./g, 'Vue.prototype.')
33+
return 'https://github.com/search?utf8=%E2%9C%93&q=repo%3Avuejs%2Fvue+extension%3Ajs+' + encodeURIComponent('"' + query + '"') + '&type=Code'
3134
}
3235
}
3336

0 commit comments

Comments
 (0)
0