You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assume the following (in real life dynamically created) string:
Your bank accounts:
DKB
✓ Logged in as jamesbond
ING
✓ Logged in as jamesbond
The indentation is there for a reason. At one stage a special character is inserted to denote the selected bank account (if an account is actually selected):
Your bank accounts:
➜ DKB
✓ Logged in as jamesbond
ING
✓ Logged in as jamesbond
Regardless if an account is selected or not, this is run through dedent.String() to get rid of the indentation of the first example above.
With v0.2.0 and v0.3.0, this works fine:
Your bank accounts:
DKB
✓ Logged in as jamesbond
ING
✓ Logged in as jamesbond
However, when the arrow is present as in the second example above, dedentation gets mangled with v0.3.0:
Your bank accounts:
➜DKB
✓ Logged in as jamesbond
ING
✓ Logged in as jamesbond
Not even the whitespace between the char and the next string is preserved.
To sum this up and give a working example, try the following code with v0.2.0 and v0.3.0:
consts=`Your bank accounts:➜ DKB ✓ Logged in as jamesbond ING ✓ Logged in as jamesbond`fmt.Print(dedent.String(s))
The text was updated successfully, but these errors were encountered:
Assume the following (in real life dynamically created) string:
The indentation is there for a reason. At one stage a special character is inserted to denote the selected bank account (if an account is actually selected):
Regardless if an account is selected or not, this is run through
dedent.String()
to get rid of the indentation of the first example above.With
v0.2.0
andv0.3.0
, this works fine:However, when the arrow is present as in the second example above, dedentation gets mangled with
v0.3.0
:Not even the whitespace between the char and the next string is preserved.
To sum this up and give a working example, try the following code with
v0.2.0
andv0.3.0
:The text was updated successfully, but these errors were encountered: