Skip to content

Commit bf6c614

Browse files
committed
Fix JS style
1 parent 8bd43bb commit bf6c614

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

assets/js/search-page.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -161,24 +161,24 @@ function docTokenFunction (token) {
161161
const namespaceRegex = /\:|\./
162162
let toSplitWords = token.toString()
163163

164-
if(arityRegex.test(toSplitWords)) {
164+
if (arityRegex.test(toSplitWords)) {
165165
const withoutArity = token
166166
.toString()
167-
.replace(arityRegex, "")
167+
.replace(arityRegex, '')
168168

169169
// This token represents ExDoc.Markdown.to_ast
170170
tokens.push(token.clone().update(() => withoutArity))
171171

172172
// And now we get each part as token: ExDoc, Markdown, and to_ast
173-
let parts = withoutArity.split(namespaceRegex)
173+
const parts = withoutArity.split(namespaceRegex)
174174

175-
if(parts.length > 1) {
176-
for(let part of parts) {
175+
if (parts.length > 1) {
176+
for (const part of parts) {
177177
tokens.push(token.clone().update(() => part))
178178
}
179179

180180
// Let's also add to_ast/2
181-
let lastWithArity = token.toString().split(namespaceRegex)
181+
const lastWithArity = token.toString().split(namespaceRegex)
182182
tokens.push(token.clone().update(() => lastWithArity[lastWithArity.length - 1]))
183183
}
184184

@@ -187,10 +187,10 @@ function docTokenFunction (token) {
187187

188188
// Now split the function name (or the token, if that's all we had),
189189
// on _ or - (but we keep the original)
190-
let words = toSplitWords.split(/\_|\-/)
190+
const words = toSplitWords.split(/\_|\-/)
191191

192-
if(words.length > 1) {
193-
for(let word of words) {
192+
if (words.length > 1) {
193+
for (const word of words) {
194194
tokens.push(token.clone().update(() => word))
195195
}
196196
}

0 commit comments

Comments
 (0)