Skip to content

URL Parsing #476

Answered by Witiko
l0th3r asked this question in Q&A
Aug 12, 2024 · 5 comments
Discussion options

You must be logged in to vote

So yes I was already overriding the render of the hyperlinks using this tho:

\global\def\markdownRendererLink#1#2#3#4{
  \href{#2}{#1}
}

Use the argument #3 instead of #2. As you can see in #475 (comment), #2 contains the URL text for typesetting with special symbols replaced with renderer commands, whereas #3 contains the raw URL text, which is what you want here.

Furthermore, you should add % at the end of the first two lines to get rid of the extra spaces around the hyperlink. Like this:

\global\def\markdownRendererLink#1#2#3#4{%
  \href{#2}{#1}%
}

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Witiko
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #475 on August 12, 2024 14:25.