Skip to content

Conversation

@guibou
Copy link
Owner

@guibou guibou commented Jan 3, 2025

Close #141.

[fmtTrim|
   foo\
   bar
|]

should be foobar instead of foo bar.

This is fixed by doing the whitespace trimming on the input string of
the quasiquotes (here \n foo\ bar) instead of the output string.

However it breaks two previous features:

  • When an interpolation block had whitespace, it should now be indented at least as much as the string, otherwise the interpolation block indentation will be used as reference.
  • Escaping the first line is now ignored. But actually, escaping the first line behaves exactly as not escaping the first line, so it breaks nothing.

Close #141.

```
[fmtTrim|
   foo\
   bar
|]
```

should be `foobar` instead of `foo   bar`.

This is fixed by doing the whitespace trimming on the input string of
the quasiquotes (here `\n    foo\    bar`) instead of the output string.

However it breaks two previous features:

- When an interpolation block had whitespace, it should now be
  indented at least as much as the string, otherwise the interpolation
  block indentation will be used as reference.
- Escaping the first line is now ignored. But actually, escaping the
  first line behaves exactly as not escaping the first line, so it
  breaks nothing.
@guibou guibou merged commit d0fed60 into main Jan 3, 2025
6 checks passed
@guibou guibou deleted the fix_wrapping_141 branch January 3, 2025 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No line break character breaks fmtTrim

2 participants