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/linecontinuation.py.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/linecontinuation.py.output')
| -rw-r--r-- | tests/examplefiles/python/linecontinuation.py.output | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/tests/examplefiles/python/linecontinuation.py.output b/tests/examplefiles/python/linecontinuation.py.output index 78680c3e..91d4157b 100644 --- a/tests/examplefiles/python/linecontinuation.py.output +++ b/tests/examplefiles/python/linecontinuation.py.output @@ -7,7 +7,7 @@ ' ' Text 'y' Name ')' Punctuation -'\n' Text +'\n' Text.Whitespace 'apple' Name '.' Operator @@ -21,9 +21,9 @@ ' ' Text 'y' Name ')' Punctuation -'\n' Text +'\n' Text.Whitespace -'\n' Text +'\n' Text.Whitespace '1' Literal.Number.Integer ' ' Text @@ -36,9 +36,9 @@ ' ' Text '__str__' Name.Function.Magic -'\n' Text +'\n' Text.Whitespace -'\n' Text +'\n' Text.Whitespace 'from' Keyword.Namespace ' ' Text @@ -47,7 +47,7 @@ 'import' Keyword.Namespace ' ' Text 'path' Name -'\n' Text +'\n' Text.Whitespace 'from' Keyword.Namespace ' \\\n ' Text @@ -59,9 +59,9 @@ 'import' Keyword.Namespace ' \\\n ' Text 'path' Name.Namespace -'\n' Text +'\n' Text.Whitespace -'\n' Text +'\n' Text.Whitespace 'import' Keyword.Namespace ' ' Text @@ -72,9 +72,9 @@ 'as' Keyword ' ' Text 'something' Name.Namespace -'\n' Text +'\n' Text.Whitespace -'\n' Text +'\n' Text.Whitespace 'import' Keyword.Namespace ' \\\n ' Text @@ -91,21 +91,21 @@ ' ' Text 'something' Name -'\n' Text +'\n' Text.Whitespace -'\n' Text +'\n' Text.Whitespace 'class' Keyword ' \\\n ' Text 'Spam' Name.Class ':' Punctuation -'\n' Text +'\n' Text.Whitespace ' ' Text 'pass' Keyword -'\n' Text +'\n' Text.Whitespace -'\n' Text +'\n' Text.Whitespace 'class' Keyword ' ' Text @@ -113,9 +113,9 @@ ':' Punctuation ' ' Text 'pass' Keyword -'\n' Text +'\n' Text.Whitespace -'\n' Text +'\n' Text.Whitespace 'class' Keyword ' ' Text @@ -124,13 +124,13 @@ 'object' Name.Builtin ')' Punctuation ':' Punctuation -'\n' Text +'\n' Text.Whitespace ' ' Text 'pass' Keyword -'\n' Text +'\n' Text.Whitespace -'\n' Text +'\n' Text.Whitespace 'class' Keyword ' \\\n ' Text @@ -140,11 +140,11 @@ ' ' Text '(' Punctuation -'\n' Text +'\n' Text.Whitespace ' ' Text 'object' Name.Builtin -'\n' Text +'\n' Text.Whitespace ' ' Text ')' Punctuation @@ -153,15 +153,15 @@ ' ' Text ':' Punctuation -'\n' Text +'\n' Text.Whitespace ' ' Text 'pass' Keyword -'\n' Text +'\n' Text.Whitespace -'\n' Text +'\n' Text.Whitespace -'\n' Text +'\n' Text.Whitespace 'def' Keyword ' \\\n ' Text @@ -186,4 +186,4 @@ ' ' Text 'pass' Keyword -'\n' Text +'\n' Text.Whitespace |
