mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 03:38:39 +00:00
Fix wide character spacing (#1371)
* Fix wide character spacing Fixes issue #1360 * Add test * Use concat
This commit is contained in:
@@ -1548,6 +1548,16 @@ describe("An HTML font tree-builder", function() {
|
||||
expect(markup).toContain(span);
|
||||
});
|
||||
|
||||
it("should render wide characters with mord and with the correct font", function() {
|
||||
const markup = katex.renderToString(String.fromCharCode(0xD835, 0xDC00));
|
||||
expect(markup).toContain("<span class=\"mord mathbf\">A</span>");
|
||||
|
||||
const phrase1 = getBuilt(String.fromCharCode(0xD835, 0xDC00) +
|
||||
" = " + String.fromCharCode(0xD835, 0xDC1A))[0];
|
||||
const phrase2 = getBuilt("\\mathbf A = \\mathbf a")[0];
|
||||
expect(phrase1).toEqual(phrase2);
|
||||
});
|
||||
|
||||
it("should throw TypeError when the expression is of the wrong type", function() {
|
||||
expect(function() {
|
||||
katex.renderToString({badInputType: "yes"});
|
||||
|
Reference in New Issue
Block a user