mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +00:00
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:
@@ -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 " "
|
||||
|
||||
Reference in New Issue
Block a user