Add strutils.indentation and make unindent use it (#15264)

* Add strutils.indentation and make unindent use it

* Code style

* Fix bootstrapping

* Improve wording

* Fix test

* Introduce without breaking change

* Fix

* Reduce diff

* Fix docs link

* Add since annotation

* Update changelog
This commit is contained in:
Clyybber
2020-09-22 10:43:12 +02:00
committed by GitHub
parent aca9c5fb30
commit d67c5cb751
3 changed files with 67 additions and 11 deletions

View File

@@ -435,3 +435,25 @@ block:
doAssert a == f1
doAssert b == f2
doAssert c == f3
block:
assert 0 == indentation """
hey
low
there
"""
assert 2 == indentation """
hey
low
there
"""
assert 2 == indentation """ hey
low
there
"""
assert 2 == indentation """ hey
low
there"""
assert 0 == indentation ""
assert 0 == indentation " \n \n"
assert 0 == indentation " "