From a5f663c249b6b02a92e7c223f48ce60015052e2a Mon Sep 17 00:00:00 2001 From: Ludwig Schubert Date: Wed, 11 Jul 2018 13:59:54 -0700 Subject: [PATCH] Disable converting ligatures during pre-rendering due to Chrome bug 862648 --- src/transforms/typeset.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/transforms/typeset.js b/src/transforms/typeset.js index f133770..8893b95 100644 --- a/src/transforms/typeset.js +++ b/src/transforms/typeset.js @@ -24,12 +24,17 @@ export default function(dom) { if (text && acceptNode(n)) { text = quotes(text); text = punctuation(text); - text = ligatures(text); + // TODO: Add back support for ligatures once their uppercased versions don't hang Chrome search anymore + // see: https://bugs.chromium.org/p/chromium/issues/detail?id=862648 + // text = ligatures(text); n.nodeValue = text; } } } +// 2018-07-11 shancarter@ and ludwigschubert@ no longer know what this was meant to accomplish +// if it was trying to not replace text in any child nodes of those listed here, +// then it does not accomplish that. function acceptNode(node) { var parent = node.parentElement; var isMath = (parent && parent.getAttribute && parent.getAttribute('class')) ? parent.getAttribute('class').includes('katex') || parent.getAttribute('class').includes('MathJax') : false;