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:
Eddie Kohler
2017-06-30 13:40:41 -04:00
committed by Kevin Barabash
parent aa1722c8b6
commit 87b9123200
2 changed files with 39 additions and 1 deletions

View File

@@ -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);
}