mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-27 07:27:33 +00:00
* Do not remove non-ASCII Unicode from multi-line string output.
* Added basic tests.
* Add Unicode test.
* Simplify tests, avoid later Jinja features.
* Refactor.
* Make use diy tests use callback test framework as well.
* Remove color codes.
* Work around stable-2.9 bug.
* Simplify again.
(cherry picked from commit 0a7ed3b019)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
c0bb56c454
commit
5fa1fc65ca
9 changed files with 322 additions and 255 deletions
|
|
@ -50,7 +50,7 @@ def my_represent_scalar(self, tag, value, style=None):
|
|||
# ...no trailing space
|
||||
value = value.rstrip()
|
||||
# ...and non-printable characters
|
||||
value = ''.join(x for x in value if x in string.printable)
|
||||
value = ''.join(x for x in value if x in string.printable or ord(x) >= 0xA0)
|
||||
# ...tabs prevent blocks from expanding
|
||||
value = value.expandtabs()
|
||||
# ...and odd bits of whitespace
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue