Skip to content

Markdown links with spaces #112

@rdnlsmith

Description

@rdnlsmith

First off, this is a fantastic extension. I write a lot of Markdown, and the auto-wrap feature makes it a really nice experience!

The one problem I have is with links that have spaces in the link text. If a link is at the end of a line (or has a very long URL) and there are no spaces, it correctly moves the link to the next line:

words words words words [text](http://this.is/a/link)

becomes

words words words words
[text](http://this.is/a/link)

But, if there is a space in the link text, it wraps at the space, breaking the link:

words words words words [link text](http://this.is/a/link)

becomes

words words words words [link
text](http://this.is/a/link)

I often get around this by placing links on their own line within the paragraph, but if the URL is long enough to go past the wrap boundary, it will be auto-wrapped as soon as I press enter.

It would be great if Rewrap could support this! I'd be glad to attempt a PR if you'd like.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions