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

autolink_bare_uris extension incorrectly parses Notes: as URI #3570

Closed
alexivkin opened this issue Apr 13, 2017 · 7 comments
Closed

autolink_bare_uris extension incorrectly parses Notes: as URI #3570

alexivkin opened this issue Apr 13, 2017 · 7 comments

Comments

@alexivkin
Copy link
Contributor

-f markdown+autolink_bare_uris
on

# Header

**Notes:**

blah

Produces

Header
======

\*\*<Notes:**>

blah

Expected result, same as running -f markdown

Header
======

**Notes:**

blah

pandoc 2.0 Compiled with pandoc-types 1.17.0.5, texmath 0.9, skylighting 0.1.1.5

@mb21
Copy link
Collaborator

mb21 commented Apr 13, 2017

The issue is that Notes: is recognized as a URL, just as http: would be.

echo '**Notes:**' | pandoc -f markdown+autolink_bare_uris -t native
[Para [Str "**",Link ("",[],[]) [Str "Notes:**"] ("Notes:**","")]]

Not sure whether we can avoid false positives like this one easily...

@alexivkin
Copy link
Contributor Author

alexivkin commented Apr 13, 2017

Thanks. I guess autolink should follow URL defs - "Notes:" is not a URL string by any existing RFC.
I'll avoid using the colon for now 😞

@alexivkin alexivkin changed the title autolink_bare_uris extension incorrectly parses bold text after a header autolink_bare_uris extension incorrectly parses strings Apr 13, 2017
@mb21
Copy link
Collaborator

mb21 commented Apr 14, 2017

For some reason, notes is one of the URI schemes pandoc recognizes (which are used in the uri function).

@mb21 mb21 changed the title autolink_bare_uris extension incorrectly parses strings autolink_bare_uris extension incorrectly parses Notes: as URI Apr 14, 2017
@alexivkin
Copy link
Contributor Author

alexivkin commented Apr 14, 2017

Probably because of lotus notes. A proper URI should have double slashes following the colon. Even then just having a type with no actual resource locatior (notes:) makes no sense as a link.

@jgm
Copy link
Owner

jgm commented Apr 15, 2017 via email

@jgm
Copy link
Owner

jgm commented Apr 15, 2017 via email

@jgm
Copy link
Owner

jgm commented Apr 15, 2017 via email

@jgm jgm closed this as completed in bcc848d Apr 15, 2017
link2xt pushed a commit to link2xt/pandoc that referenced this issue Apr 25, 2017
This avoids parsing bare URIs that start with a scheme
+ colon + `*`, `_`, or `]`.

Closes jgm#3570.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants