Skip to content

Commit

Permalink
Mirror pattern from Pygments JSON5
Browse files Browse the repository at this point in the history
  • Loading branch information
tancnle committed Nov 11, 2024
1 parent 89624a3 commit 1aeddb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rouge/lexers/json5.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class JSON5 < JSON
rule %r/[+-]?\b(?:Infinity|NaN)\b/, Keyword::Constant
rule %r/[+-]?0x\h+/i, Num::Hex

rule %r/[+-]?\d*\.\d*(?:e[+-]?\d+)?/i, Num::Float
rule %r/[+-.]?[0-9]+[.]?[0-9]?([eE][-]?[0-9]+)?/i, Num::Float
rule %r/[+-]?\d+e[+-]?\d+/, Num::Integer
rule %r/[+-]?(?:0|[1-9]\d*)(?:e[+-]?\d+)?/i, Num::Integer
end
Expand Down

0 comments on commit 1aeddb5

Please sign in to comment.