mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-18 17:28:38 +00:00
Correct handling of unbraced kerns followed by spaces. (#751)
Did not realize that `Parser.nextToken.text` can contain spaces (it can). Handle that.
This commit is contained in:
committed by
Kevin Barabash
parent
aa1722c8b6
commit
87b9123200
@@ -789,7 +789,7 @@ Parser.prototype.parseSizeGroup = function(optional) {
|
||||
let res;
|
||||
if (!optional && this.nextToken.text !== "{") {
|
||||
res = this.parseRegexGroup(
|
||||
/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2}$/, "size");
|
||||
/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/, "size");
|
||||
} else {
|
||||
res = this.parseStringGroup("size", optional);
|
||||
}
|
||||
|
Reference in New Issue
Block a user