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

Markdown to Typst: Unnecessary semicolon if a hyperlink is followed by a non-whitespace character #10240

Open
jsx97 opened this issue Sep 30, 2024 · 1 comment
Labels

Comments

@jsx97
Copy link

jsx97 commented Sep 30, 2024

Pandoc 3.4, macOS Sonoma 14.5.

If converting from Markdown to Typst, if a hyperlink is followed by a non-whitespace character, e.g. a comma, period, colon, or semicolon, Pandoc adds unnecessary semicolon. The issue is similar to #10148.

Markdown:

Lorem [ipsum](http://ipsum.com): dolor sit amet.

Source: <http://google.com>.

Typst, current output:

Lorem #link("http://ipsum.com")[ipsum];: dolor sit amet.

Source: #link("http://google.com");.

Typst, expected output:

Lorem #link("http://ipsum.com")[ipsum]: dolor sit amet.

Source: #link("http://google.com").
@jsx97 jsx97 added the bug label Sep 30, 2024
@jgm
Copy link
Owner

jgm commented Sep 30, 2024

Here the semicolon is harmless, even if unnecessary. Not like #10148 where the semicolon was causing undesirable results.

There are cases where the semicolon is needed. For background, see #9252.

Perhaps pandoc could be smarter about when it is needed; for now, we have just been conservative (and it is particularly easy to do it this way, because we can use a doclayout combinator that inserts content only if followed by a non-space).

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

No branches or pull requests

2 participants