commit 95f2f46bf59e3739d4386503142e4b99ba68f70c
parent 7433638fdaccdfbe0c5b661844c8e99c393a7d25
Author: Kevin Barabash <kevinb7@gmail.com>
Date: Thu, 8 Dec 2016 22:56:23 -0500
Merge pull request #581 from kohler/stylespacing
BUG FIX: Correct spacing next to symbols when styles switch.
Diffstat:
4 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/buildHTML.js b/src/buildHTML.js
@@ -83,7 +83,7 @@ var buildExpression = function(expression, options, isRealGroup) {
i--;
} else if (spaces) {
if (groups[i] instanceof domTree.symbolNode) {
- groups[i] = makeSpan(groups[i].classes, [groups[i]]);
+ groups[i] = makeSpan([].concat(groups[i].classes), [groups[i]]);
}
buildCommon.prependChildren(groups[i], spaces);
spaces = null;
diff --git a/test/screenshotter/images/StyleSpacing-chrome.png b/test/screenshotter/images/StyleSpacing-chrome.png
Binary files differ.
diff --git a/test/screenshotter/images/StyleSpacing-firefox.png b/test/screenshotter/images/StyleSpacing-firefox.png
Binary files differ.
diff --git a/test/screenshotter/ss_data.yaml b/test/screenshotter/ss_data.yaml
@@ -117,6 +117,7 @@ Sqrt: |
SqrtRoot: |
1+\sqrt[3]{2}+\sqrt[1923^234]{2^{2^{2^{2^{2^{2^{2^{2^{2^{2^{2^2}}}}}}}}}}}
StackRel: a \stackrel{?}{=} b \stackrel{\text{def}}{=} c
+StyleSpacing: \scriptstyle ab\;cd
StyleSwitching: a\cdot b\scriptstyle a\cdot ba\textstyle\cdot ba\scriptstyle\cdot b
SupSubCharacterBox: a_2f_2{f}_2{aa}_2{af}_2\mathbf{y}_Ay_A
SupSubHorizSpacing: |