1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-07-15 01:14:21 +02:00

Fix some buggy number patterns.

Fixes #507.
This commit is contained in:
Alec Thomas
2021-06-22 16:41:06 +09:30
parent d4eaef361b
commit 6a6cf1764d
2 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ func phpCommonRules() Rules {
{`\d+e[+-]?[0-9]+`, LiteralNumberFloat, nil},
{`0[0-7]+`, LiteralNumberOct, nil},
{`0x[a-f0-9_]+`, LiteralNumberHex, nil},
{`[\d_]+`, LiteralNumberInteger, nil},
{`\d[\d_]*`, LiteralNumberInteger, nil},
{`0b[01]+`, LiteralNumberBin, nil},
{`'([^'\\]*(?:\\.[^'\\]*)*)'`, LiteralStringSingle, nil},
{"`([^`\\\\]*(?:\\\\.[^`\\\\]*)*)`", LiteralStringBacktick, nil},