This triggers a new case in the HtmlFormatter, which emits an empty span at the end of the line for a new line, as those are removed by the split-by-parts code. This requires separate post-processing. Doesn't fix all whitespace issues with Python either, but we're done to 360 failing examples with that, from previously >400.
28 lines
582 B
Text
28 lines
582 B
Text
# Tests that the lexer can parse numeric literals with underscores
|
|
|
|
---input---
|
|
1_000_000
|
|
1_000.000_001
|
|
1_000e1_000j
|
|
0xCAFE_F00D
|
|
0b_0011_1111_0100_1110
|
|
0o_777_123
|
|
|
|
---tokens---
|
|
'1_000_000' Literal.Number.Integer
|
|
'\n' Text.Whitespace
|
|
|
|
'1_000.000_001' Literal.Number.Float
|
|
'\n' Text.Whitespace
|
|
|
|
'1_000e1_000j' Literal.Number.Float
|
|
'\n' Text.Whitespace
|
|
|
|
'0xCAFE_F00D' Literal.Number.Hex
|
|
'\n' Text.Whitespace
|
|
|
|
'0b_0011_1111_0100_1110' Literal.Number.Bin
|
|
'\n' Text.Whitespace
|
|
|
|
'0o_777_123' Literal.Number.Oct
|
|
'\n' Text.Whitespace
|