-
Notifications
You must be signed in to change notification settings - Fork 683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix: unindent description misbehaviors #1707
Conversation
oh my, finally fixed this... 😁 |
end | ||
|
||
it 'adds a multiline description' do | ||
t = rand_string + "\n" + rand_string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for example, this was not working with the old method, it would just replace the newline character
end | ||
|
||
it 'strips empty lines and spaces in description at start and end' do | ||
t = " \n" + rand_string + "\n " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add tests for this behavior, make sure we don't break anyone unexpectedly
Unindent has been misbehaving for control `desc`riptions by completely removing newlines. This is now fixed and the unindentation mechanism improved to behave as expected. Removing empty lines at the beginning and end of string remains unchanged. Tabs are not treated as multi-space indentations; supporting them as 8-space chars would require additional effort (please comment if this is important to you) Signed-off-by: Dominik Richter <[email protected]>
06f61ab
to
37a2e45
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful. Thank you @arlimus
Unindent has been misbehaving for control
desc
riptions by completely removing newlines. This is now fixed and the unindentation mechanism improved to behave as expected.Removing empty lines at the beginning and end of string remains unchanged.
Tabs are not treated as multi-space indentations; supporting them as 8-space chars would require additional effort (please comment if this is important to you)
Signed-off-by: Dominik Richter [email protected]