diff options
| author | Matthäus G. Chajdas <dev@anteru.net> | 2022-12-11 12:52:23 +0100 |
|---|---|---|
| committer | Matthäus G. Chajdas <dev@anteru.net> | 2022-12-11 12:52:23 +0100 |
| commit | 147b22face65617514ccfa8512c6b097b07cad4c (patch) | |
| tree | 56a06e1627d9e159f84becb4664d0ec46788a8f5 /tests/examplefiles/python/switch_case.txt.output | |
| parent | 956518d6d6b62e755f8a3869c5cb143a243fdc4d (diff) | |
| download | pygments-git-147b22face65617514ccfa8512c6b097b07cad4c.tar.gz | |
Improve whitespace handling in Python.
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.
Diffstat (limited to 'tests/examplefiles/python/switch_case.txt.output')
| -rw-r--r-- | tests/examplefiles/python/switch_case.txt.output | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/tests/examplefiles/python/switch_case.txt.output b/tests/examplefiles/python/switch_case.txt.output index 2abf65a5..3c07db9c 100644 --- a/tests/examplefiles/python/switch_case.txt.output +++ b/tests/examplefiles/python/switch_case.txt.output @@ -6,7 +6,7 @@ '(' Punctuation ')' Punctuation ':' Punctuation -'\n' Text +'\n' Text.Whitespace ' ' Text 'case' Keyword @@ -30,13 +30,13 @@ '.' Operator 'route' Name ':' Punctuation -'\n' Text +'\n' Text.Whitespace ' ' Text 'return' Keyword ' ' Text '1' Literal.Number.Integer -'\n' Text +'\n' Text.Whitespace ' ' Text 'case' Keyword @@ -51,13 +51,13 @@ 'bar' Literal.String.Single "'" Literal.String.Single ':' Punctuation -'\n' Text +'\n' Text.Whitespace ' ' Text 'return' Keyword ' ' Text '2' Literal.Number.Integer -'\n' Text +'\n' Text.Whitespace ' ' Text 'case' Keyword @@ -70,17 +70,17 @@ ' ' Text 'name' Name ':' Punctuation -'\n' Text +'\n' Text.Whitespace ' ' Text 'return' Keyword ' ' Text '3' Literal.Number.Integer -'\n' Text +'\n' Text.Whitespace ' ' Text 'case' Keyword -' ' Text +' ' Text.Whitespace '[' Punctuation "'" Literal.String.Single 'to' Literal.String.Single @@ -90,41 +90,41 @@ '_' Keyword ']' Punctuation ':' Punctuation -'\n' Text +'\n' Text.Whitespace ' ' Text 'return' Keyword ' ' Text '4' Literal.Number.Integer -'\n' Text +'\n' Text.Whitespace ' ' Text 'case' Keyword ' ' Text 'else_bar' Name ':' Punctuation -'\n' Text +'\n' Text.Whitespace ' ' Text 'return' Keyword ' ' Text '5' Literal.Number.Integer -'\n' Text +'\n' Text.Whitespace ' ' Text 'case' Keyword -' ' Text +' ' Text.Whitespace '_' Keyword ':' Punctuation -'\n' Text +'\n' Text.Whitespace ' ' Text 'return' Keyword ' ' Text '6' Literal.Number.Integer -'\n' Text +'\n' Text.Whitespace -'\n' Text +'\n' Text.Whitespace 'match' Keyword ' ' Text @@ -134,7 +134,7 @@ '(' Punctuation ')' Punctuation ':' Punctuation -'\n' Text +'\n' Text.Whitespace ' ' Text 'case' Keyword @@ -143,46 +143,46 @@ '(' Punctuation ')' Punctuation ':' Punctuation -'\n' Text +'\n' Text.Whitespace ' ' Text 'return' Keyword ' ' Text '1' Literal.Number.Integer -'\n' Text +'\n' Text.Whitespace ' ' Text 'case' Keyword -' ' Text +' ' Text.Whitespace '_' Keyword ' ' Text 'as' Keyword ' ' Text 'default' Name ':' Punctuation -'\n' Text +'\n' Text.Whitespace ' ' Text 'return' Keyword ' ' Text '2' Literal.Number.Integer -'\n' Text +'\n' Text.Whitespace -'\n' Text +'\n' Text.Whitespace 'case' Name ' ' Text '=' Operator ' ' Text '1' Literal.Number.Integer -'\n' Text +'\n' Text.Whitespace 'match' Name ' ' Text '=' Operator ' ' Text '1' Literal.Number.Integer -'\n' Text +'\n' Text.Whitespace 'match' Name ' ' Text @@ -193,4 +193,4 @@ 'else' Keyword ' ' Text 'bar' Name -'\n' Text +'\n' Text.Whitespace |
