Merge pull request #21709 from calixteman/postscript-number-regex

Remove the ambiguity from the PostScript number regex
This commit is contained in:
Tim van der Meij 2026-08-04 20:52:03 +02:00 committed by GitHub
commit 729ddf907f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -132,7 +132,7 @@ class Lexer {
this.pos = 0; this.pos = 0;
this.len = data.length; this.len = data.length;
// Sticky regexes: set lastIndex before exec() to match at an exact offset. // Sticky regexes: set lastIndex before exec() to match at an exact offset.
this._numberPattern = /[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/iy; this._numberPattern = /[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?/iy;
this._identifierPattern = /[a-z]+/y; this._identifierPattern = /[a-z]+/y;
} }