Skip to content

Commit

Permalink
docs: rename 'el' variable to 'elem'. I just don't like that 'el', eugh
Browse files Browse the repository at this point in the history
  • Loading branch information
Omnikron13 committed May 18, 2024
1 parent f01b914 commit a853f15
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/assets/scripts/add_accents.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ window.addEventListener('DOMContentLoaded', () => {
{name: 'Material Design Icons', ranges: [{first: 0xf0001, last: 0xf1af0}]},
]

accentify.forEach((el) => {
const text = el.innerText
accentify.forEach((elem) => {
const text = elem.innerText
const firstChar = text.codePointAt(0)
if (nerdRanges.map(r => r.ranges).flat().some(r => firstChar >= r.first && firstChar <= r.last)) {
const glyph = String.fromCodePoint(firstChar)
const tail = text.substring(glyph.length)
const accentSpan = document.createElement('span')
accentSpan.classList.add('accent', 'nerd-font')
accentSpan.innerText = glyph
el.replaceChildren(accentSpan, tail)
elem.replaceChildren(accentSpan, tail)
}
})
})

0 comments on commit a853f15

Please sign in to comment.