Skip to content

Commit ffd4276

Browse files
authored
Update search-page.js
1 parent 0d707ea commit ffd4276

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

assets/js/search-page.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,6 @@ function docTokenFunction (token) {
167167
tokens.push(token.clone().update(() => toSplitWords))
168168
}
169169

170-
// allow searching for atoms without `:`
171-
if (toSplitWords.startsWith(':')) {
172-
toSplitWords = toSplitWords.slice(1)
173-
tokens.push(token.clone().update(() => toSplitWords))
174-
}
175-
176170
if (arityRegex.test(toSplitWords)) {
177171
const withoutArity = token
178172
.toString()
@@ -200,6 +194,10 @@ function docTokenFunction (token) {
200194
// also make it searchable as foo_bar
201195
toSplitWords = toSplitWords.substring(1)
202196
tokens.push(token.clone().update(() => toSplitWords))
197+
} else if (toSplitWords.startsWith(':')) {
198+
// allow searching for atoms without `:`
199+
toSplitWords = toSplitWords.slice(1)
200+
tokens.push(token.clone().update(() => toSplitWords))
203201
}
204202

205203
// Now split the function name (or the token, if that's all we had),

0 commit comments

Comments
 (0)