Skip to content

Commit aceb9e0

Browse files
committed
style: eslint --fix .
1 parent f435a44 commit aceb9e0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docs/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ function applyColorSchemePreference() {
3939
storeColorSchemePreference()
4040
applyColorSchemePreference()
4141

42-
4342
function addAnnotations() {
4443
for (const codeBlock of document.querySelectorAll('.highlighter-rouge')) {
4544
const comment = parseCommentNode(codeBlock)
@@ -68,7 +67,7 @@ function parseCommentNode(el) {
6867
return {
6968
noDemo: type.match(/no_demo/),
7069
onlyDemo: type.match(/only_demo/),
71-
annotations: type.match(/annotations/) && details,
70+
annotations: type.match(/annotations/) && details
7271
}
7372
}
7473

@@ -80,7 +79,7 @@ function annotate(codeBlock, items) {
8079
for (const item of items) {
8180
let currentNode = el
8281
const [pattern, rest] = item.split(/: /)
83-
const [title, link] = (rest||'').split(/ \| /)
82+
const [title, link] = (rest || '').split(/ \| /)
8483
const parts = pattern.split(' ')
8584
let toAnnotate = []
8685
for (const part of parts) {
@@ -100,7 +99,7 @@ function annotate(codeBlock, items) {
10099
}
101100
annotated.set(node, title)
102101
const a = document.createElement('a')
103-
a.className = node.className + ' code-tooltip tooltipped tooltipped-multiline tooltipped-se bg-gray text-underline'
102+
a.className = `${node.className} code-tooltip tooltipped tooltipped-multiline tooltipped-se bg-gray text-underline`
104103
a.id = `match-${matchIndex++}`
105104
a.href = link || `#${a.id}`
106105
a.setAttribute('data-title', title)
@@ -113,6 +112,7 @@ function annotate(codeBlock, items) {
113112
}
114113
}
115114
for (const pattern of noMatch) {
115+
// eslint-disable-next-line no-console
116116
console.error(`Code annotations: No match found for "${pattern}"`)
117117
}
118118
}

0 commit comments

Comments
 (0)