mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-10 05:28:41 +00:00
Somehow manage to fix the sizing bugs
Summary: Remove a single `vertical-align: top`, and somewhow it now works. May the gods of CSS have mercy on us. Also added some tests. Test Plan: - See that the huxley tests don't have any changes - See that the new huxley screenshots look reasonable - Run the normal tests and see that they work Reviewers: alpert Reviewed By: alpert Differential Revision: http://phabricator.khanacademy.org/D7494
This commit is contained in:
@@ -423,3 +423,27 @@ describe("A frac parser", function() {
|
||||
expect(tfracParse.value.denom).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe("A sizing parser", function() {
|
||||
var sizeExpression = "\\Huge{x}\\small{x}";
|
||||
var nestedSizeExpression = "\\Huge{\\small{x}}";
|
||||
|
||||
it("should not fail", function() {
|
||||
expect(function() {
|
||||
parseTree(sizeExpression);
|
||||
}).not.toThrow();
|
||||
});
|
||||
|
||||
it("should produce a sizing node", function() {
|
||||
var parse = parseTree(sizeExpression)[0];
|
||||
|
||||
expect(parse.type).toMatch("sizing");
|
||||
expect(parse.value).toBeDefined();
|
||||
});
|
||||
|
||||
it("should not parse a nested size expression", function() {
|
||||
expect(function() {
|
||||
parseExpression(nestedSizeExpression);
|
||||
}).toThrow();
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user