From 147b22face65617514ccfa8512c6b097b07cad4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matth=C3=A4us=20G=2E=20Chajdas?= Date: Sun, 11 Dec 2022 12:52:23 +0100 Subject: 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. --- tests/examplefiles/python/unicodedoc.py.output | 28 +++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'tests/examplefiles/python/unicodedoc.py.output') diff --git a/tests/examplefiles/python/unicodedoc.py.output b/tests/examplefiles/python/unicodedoc.py.output index 0d40ef21..9fb70e7c 100644 --- a/tests/examplefiles/python/unicodedoc.py.output +++ b/tests/examplefiles/python/unicodedoc.py.output @@ -4,14 +4,14 @@ '(' Punctuation ')' Punctuation ':' Punctuation -'\n' Text +'\n' Text.Whitespace -' ' Text +' ' Text.Whitespace 'ur' Literal.String.Affix '"""unicode-raw"""' Literal.String.Doc -'\n' Text +'\n' Text.Whitespace -'\n' Text +'\n' Text.Whitespace 'def' Keyword ' ' Text @@ -19,14 +19,14 @@ '(' Punctuation ')' Punctuation ':' Punctuation -'\n' Text +'\n' Text.Whitespace -' ' Text +' ' Text.Whitespace 'u' Literal.String.Affix '"""unicode"""' Literal.String.Doc -'\n' Text +'\n' Text.Whitespace -'\n' Text +'\n' Text.Whitespace 'def' Keyword ' ' Text @@ -34,16 +34,16 @@ '(' Punctuation ')' Punctuation ':' Punctuation -'\n' Text +'\n' Text.Whitespace ' ' Text 'r' Literal.String.Affix "'" Literal.String.Single 'raw' Literal.String.Single "'" Literal.String.Single -'\n' Text +'\n' Text.Whitespace -'\n' Text +'\n' Text.Whitespace 'def' Keyword ' ' Text @@ -51,8 +51,8 @@ '(' Punctuation ')' Punctuation ':' Punctuation -'\n' Text +'\n' Text.Whitespace -' ' Text +' ' Text.Whitespace '"""docstring"""' Literal.String.Doc -'\n' Text +'\n' Text.Whitespace -- cgit v1.2.1