fix: 修復 inline mathjax 有滾動條的 bug

This commit is contained in:
Jerry
2021-07-06 15:52:21 +08:00
Unverified
parent 3f796adc88
commit eca1487a5e
3 changed files with 14 additions and 7 deletions

View File

@@ -21,7 +21,17 @@ script.
math.end = {node: text, delim: '', n: 0}
doc.math.push(math)
}
}, '']
}, ''],
insertScript: [200, () => {
document.querySelectorAll('mjx-container:not\([display]\)').forEach(node => {
const target = node.parentNode
if (target.nodeName.toLowerCase() === 'li') {
target.parentNode.classList.add('has-jax')
} else {
target.classList.add('has-jax')
}
});
}, '', false]
}
}
}