Revert "Make KaTeX work in Quirks mode (#608)" (#777)

This reverts commit d93a958379.
This commit is contained in:
Kevin Barabash
2017-07-30 23:28:58 -04:00
committed by GitHub
parent d93a958379
commit 1e148746f8
8 changed files with 40 additions and 84 deletions

View File

@@ -347,8 +347,7 @@ const makeVList = function(children, positionType, positionData, options) {
} else {
const child = children[i].elem;
const childWrap = makeSpan(
[], [pstrut, child, new domTree.symbolNode("\u200b")]);
const childWrap = makeSpan([], [pstrut, child]);
childWrap.style.top = (-pstrutSize - currPos - child.depth) + "em";
if (children[i].marginLeft) {
childWrap.style.marginLeft = children[i].marginLeft;

View File

@@ -761,20 +761,16 @@ groupTypes.spacing = function(group, options) {
groupTypes.llap = function(group, options) {
const inner = makeSpan(
["inner"], [
buildGroup(group.value.body, options),
new domTree.symbolNode("\u200b")]);
const fix = makeSpan(["fix"], [new domTree.symbolNode("\u200b")]);
["inner"], [buildGroup(group.value.body, options)]);
const fix = makeSpan(["fix"], []);
return makeSpan(
["mord", "llap"], [inner, fix], options);
};
groupTypes.rlap = function(group, options) {
const inner = makeSpan(
["inner"], [
buildGroup(group.value.body, options),
new domTree.symbolNode("\u200b")]);
const fix = makeSpan(["fix"], [new domTree.symbolNode("\u200b")]);
["inner"], [buildGroup(group.value.body, options)]);
const fix = makeSpan(["fix"], []);
return makeSpan(
["mord", "rlap"], [inner, fix], options);
};
@@ -1743,10 +1739,7 @@ const buildHTML = function(tree, options) {
bottomStrut.style.verticalAlign = -body.depth + "em";
// Wrap the struts and body together
const htmlNode = makeSpan(["katex-html"], [
topStrut, bottomStrut, body,
// Quirks mode fix
new domTree.symbolNode("\u200b")]);
const htmlNode = makeSpan(["katex-html"], [topStrut, bottomStrut, body]);
htmlNode.setAttribute("aria-hidden", "true");