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 [translation@castb.org](mailto:translation@castb.org) with citations option enabled is interpreted as a citation:

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

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

$ pandoc -f markdown+citations <<< '[translation@castb.org](mailto:translation@castb.org)'
<p><a href="mailto:translation@castb.org">translation@castb.org</a></p>
$ pandoc -f markdown+citations <<< '[translation @castb.org](mailto:translation@castb.org)'
<p><span class="citation" data-cites="castb.org">[translation @castb.org]</span>(mailto:translation@castb.org)</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 <<< '[translation@castb.org](mailto:translation@castb.org)'
\markdownRendererDocumentBegin
\markdownRendererLink{translation@castb.org}{mailto:translation@castb.org}{mailto:translation@castb.org}{}\markdownRendererDocumentEnd
$ docker run --rm -i ghcr.io/witiko/markdown:3.4.2-31-g02122159-TL2022-historic-no_docs markdown-cli citations=true <<< '<translation@castb.org>'
\markdownRendererDocumentBegin
\markdownRendererLink{translation@castb.org}{mailto:translation@castb.org}{mailto:translation@castb.org}{}\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