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

E-mail addresses are incorrectly interpreted as bracketed citations #424

Closed
Witiko opened this issue Mar 14, 2024 · 1 comment · Fixed by #426
Closed

E-mail addresses are incorrectly interpreted as bracketed citations #424

Witiko opened this issue Mar 14, 2024 · 1 comment · Fixed by #426
Assignees
Labels
bug lua Related to the Lua interface and implementation syntax extension Related to syntax extensions and dialects of markdown
Milestone

Comments

@Witiko
Copy link
Owner

Witiko commented Mar 14, 2024

Writing [[email protected]](mailto:[email protected]) with citations option enabled is interpreted as a citation:

$ markdown-cli citations=true <<< '[[email protected]](mailto:[email protected])'
\markdownRendererDocumentBegin
\markdownRendererCite{1}+{translation}{}{castb.org}(mailto:[email protected])\markdownRendererDocumentEnd

However, this should only happen when there is whitespace before the @:

$ pandoc -f markdown+citations <<< '[[email protected]](mailto:[email protected])'
<p><a href="mailto:[email protected]">[email protected]</a></p>
$ pandoc -f markdown+citations <<< '[translation @castb.org](mailto:[email protected])'
<p><span class="citation" data-cites="castb.org">[translation @castb.org]</span>(mailto:[email protected])</p>
@Witiko Witiko added bug lua Related to the Lua interface and implementation syntax extension Related to syntax extensions and dialects of markdown labels Mar 14, 2024
@Witiko Witiko added this to the 3.5.0 milestone Mar 14, 2024
@Witiko Witiko self-assigned this Mar 14, 2024
@Witiko
Copy link
Owner Author

Witiko commented Mar 18, 2024

Pull request #426 should fix the issue:

$ docker run --rm -i ghcr.io/witiko/markdown:3.4.2-31-g02122159-TL2022-historic-no_docs markdown-cli citations=true <<< '[[email protected]](mailto:[email protected])'
\markdownRendererDocumentBegin
\markdownRendererLink{[email protected]}{mailto:[email protected]}{mailto:[email protected]}{}\markdownRendererDocumentEnd
$ docker run --rm -i ghcr.io/witiko/markdown:3.4.2-31-g02122159-TL2022-historic-no_docs markdown-cli citations=true <<< '<[email protected]>'
\markdownRendererDocumentBegin
\markdownRendererLink{[email protected]}{mailto:[email protected]}{mailto:[email protected]}{}\markdownRendererDocumentEnd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug lua Related to the Lua interface and implementation syntax extension Related to syntax extensions and dialects of markdown
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant