Skip to content

Navi collapses multiple newlines into a single newline #539

Closed
@knpwrs

Description

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:

% Git

# Commit with co-author
git commit -m "$(cat <<EOF
<commit_message>

<co_author>
EOF
)"

$ co_author: git log --pretty="%an <%ae>" | sort | uniq | sed 's|^|Co-authored-by: |g'

I expect the following to be populated to my shell:

git commit -m "$(cat <<EOF
My awesome commit message

Co-authored-by: User <user@example.com>
EOF
)"

Instead, the following is populated to my shell:

git commit -m "$(cat <<EOF
My awesome commit message
Co-authored-by: User <user@example.com>
EOF
)"

The newlines between the first line of the message on the Co-authored-by line are collapsed into a single newline.

Versions:

  • OS: macOS 11
  • Shell Version GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin20)

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions