Skip to content

Fix automatic links by restricting characters in mail links. #187

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

Merged
merged 1 commit into from
Jul 23, 2016
Merged

Fix automatic links by restricting characters in mail links. #187

merged 1 commit into from
Jul 23, 2016

Conversation

bwhelm
Copy link
Contributor

@bwhelm bwhelm commented Jul 23, 2016

(This was raised in Issue #186.)

Previously, pandocAutomaticLink captures too much in the e-mail side. For example, the following is captured as a single e-mail link:

<div>Here is a sentence with a @citation. Here is another sentence.</div>

The presence of the @ and . in between any < and >, regardless of other content will result in a match.

What's needed is to restrict e-mail addresses to a certain range of characters, not including the space character. (See https://en.wikipedia.org/wiki/Email_address#Syntax.) This patch fixes this.

Previously, pandocAutomaticLink captures too much in the e-mail side. For example, the following is captured as a single e-mail link:

    <div>Here is a sentence with a @citation. Here is another sentence.</div>

The presence of the @ and . in between any < and >, regardless of other content will result in a match.

What's needed is to restrict e-mail addresses to a certain range of characters, not including the space character. (See https://en.wikipedia.org/wiki/Email_address#Syntax.) This patch fixes this.
@fmoralesc fmoralesc merged commit c14f826 into vim-pandoc:master Jul 23, 2016
@fmoralesc
Copy link
Member

Thanks!

@bwhelm bwhelm deleted the autoLinks branch July 23, 2016 17:43
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.

2 participants