{
}
}
+// we want to display annotations like `{f}` or `[comp.]` in different formatting
const annotationRe = /\{[^}]+\}|\[[^\]]+\]/g
+// words in angle brackets are common misspellings or other cross-references that should be hidden from view
+const hideRe = /<.+?>/g
// when the HTML page has finished loading:
window.addEventListener('DOMContentLoaded', async () => {
@@ -250,12 +253,15 @@ window.addEventListener('DOMContentLoaded', async () => {
td0.innerHTML = td0.innerHTML.replaceAll(whatRe, '$&')
// and apply special formatting to annotations:
.replaceAll(annotationRe, '$&')
+ // and certain words should not be displayed at all:
+ .replaceAll(hideRe, '$&')
tr.appendChild(td0)
// right , English
const td1 = document.createElement('td')
td1.innerText = en.trim()
td1.innerHTML = td1.innerHTML.replaceAll(whatRe, '$&')
.replaceAll(annotationRe, '$&')
+ .replaceAll(hideRe, '$&')
// the "feedback" button on each result
if (!i && ENABLE_FEEDBACK) {
const fbIcon = document.createElement('div')
|