Skip to content

Commit

Permalink
docs: don't try and muck about span wrapping if the element isn't the…
Browse files Browse the repository at this point in the history
… direct parent of just text
  • Loading branch information
Omnikron13 committed May 18, 2024
1 parent a853f15 commit 6ba72cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/assets/scripts/add_accents.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ window.addEventListener('DOMContentLoaded', () => {
]

accentify.forEach((elem) => {
if (elem.children.length > 0) {
return
}
const text = elem.innerText
const firstChar = text.codePointAt(0)
if (nerdRanges.map(r => r.ranges).flat().some(r => firstChar >= r.first && firstChar <= r.last)) {
Expand Down

0 comments on commit 6ba72cd

Please sign in to comment.