Skip to content
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

changed regex to allow parenthesis in link names #600

Closed
wants to merge 1 commit into from

Conversation

RemiArnaud
Copy link

Before the patch, this:
blabla would generate incorrect href="link(text"

now it generate href="link(text)"

The fix is to make the regex greedy, so it takes all the characteres in the href until the last ')'

@AlastairTaft
Copy link

+1 Just hit this with inline images

@adam-lynch
Copy link

If I understand correctly and this would fix the fact that https://en.wikipedia.org/wiki/Football_(disambiguation) autolinks to <a href="https://en.wikipedia.org/wiki/Football_(disambiguation">https://en.wikipedia.org/wiki/Football_(disambiguation</a>), then a big 👍

@RemiArnaud
Copy link
Author

Yes it does

shiren added a commit to nhn/marked that referenced this pull request Aug 12, 2016
mxstbr added a commit to mxstbr/draft-js-utils that referenced this pull request Oct 4, 2017
Makes `href` matching of links and images non-greedy.

This fix is copied from markedjs/marked#600, and
fixes the failing tests submitted in the previous commit.
sstur pushed a commit to sstur/draft-js-utils that referenced this pull request Oct 5, 2017
* [draft-js-import-markdown] replicate issue with complex image sources

* [draft-js-import-markdown] fix links with complex sources

Makes `href` matching of links and images non-greedy.

This fix is copied from markedjs/marked#600, and
fixes the failing tests submitted in the previous commit.

* Fix linting

* make the tooling happy
@joshbruce joshbruce added this to the 0.4.0 - No known defects milestone Dec 25, 2017
@joshbruce
Copy link
Member

#984

@joshbruce
Copy link
Member

Closing due to merge conflicts and missing tests.

@joshbruce joshbruce closed this Jan 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants