mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 19:40:55 +08:00
fix: 修復 inline mathjax 有滾動條的 bug
This commit is contained in:
12
layout/includes/third-party/math/mathjax.pug
vendored
12
layout/includes/third-party/math/mathjax.pug
vendored
@@ -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]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user