[latex] output: email autolinks is missing a pair of curly braces
file that demonstrates the issue: [repro.tex](https://github.com/user-attachments/files/24280598/repro.txt)
latex output for email autolinks is incorrect:
input [repro.md](https://github.com/user-attachments/files/24280603/repro.md):
`<example@example.com>`
output of `cmark --to latex repro.md`:
`\href{mailto:example@example.com}\nolinkurl{example@example.com}`
expected (matching pandoc):
`\href{mailto:example@example.com}{\nolinkurl{example@example.com}}`
difference: the "clickable link" covers a sliver instead of covering the entire text area
example: [repro.pdf](https://github.com/user-attachments/files/24280606/repro.pdf)
tested with:
cmark `cmark 0.31.1 - CommonMark converter`
lualatex `This is LuaHBTeX, Version 1.18.0 (TeX Live 2024/Alpine Linux)`
pdf reader: zathura `zathura 0.5.14
girara 0.4.5 (runtime: 0.4.5)
(plugin) djvu (0.2.11) (/usr/lib/zathura/libdjvu.so)
(plugin) pdf-mupdf (0.4.4) (/usr/lib/zathura/libpdf-mupdf.so)` (browser behaves differently)
code in question: https://github.com/commonmark/cmark/blob/32564a47f10202b69eee24f4946476c8865de1e6/src/latex.c#L412
关闭于 2025-12-21 1 条评论