-
Notifications
You must be signed in to change notification settings - Fork 507
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
Navi collapses multiple newlines into a single newline #539
Comments
Thanks for opening your first issue here! In case you're facing a bug, please update navi to the latest version first. Maybe the bug is already solved! :) |
Interesting use case, but I'm afraid multi-line snippets will never be reliable. If one of the lines between the EOFs start with Anyway, consecutive newlines get collapsed because navi ignores empty lines. Considering empty lines is tricky because it's not clear where snippets start/end. I guess I could right trim them, though. |
I managed to get something that works for my use case (i.e., pre-populating co-authors for git commit messages based on authors in the current repo). Feel free to close this issue if newlines aren't going to be supported. For anyone reading this issue looking for a similar snippet, my solution is very
I found out through this answer on StackOverflow that you can pass multiple
This works for me in
The
My |
Nice! I intend to make navi not ignore blank lines in the near future, but multi-line snippets will always have some caveats, as I said. Regarding workarounds, there are a multitude of ways to build multi-line strings. Example:
|
I could have sworn I tried EDIT: I know what I did. I tried |
Describe the bug
Navi collapses multiple newlines into a single newline.
To Reproduce
Consider the following snippet to compose a commit message with a co-author:
I expect the following to be populated to my shell:
Instead, the following is populated to my shell:
The newlines between the first line of the message on the
Co-authored-by
line are collapsed into a single newline.Versions:
The text was updated successfully, but these errors were encountered: