-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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 escaping problem #2260
Comments
Is #2168 can be related to this bug in a way? Or could this issue help to resolve it - or at least opens the discussion of the way to go? In my opinion, we should not have to escape short links in a code block... Thanks in advance! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
FYI: This still happens with Gitea 1.7. |
I just ran into this when trying to escape backticks inside a shell command, so they're getting displayed inside an inline code sample:
|
@schmittlauch that is different, to to use backtick in code you should use:
|
with 1.21.11 you can use
which renders as
if you'd used
then it would render as
so there is still some bug in there somewhere |
The problem is that the render parsers are wrong. At the moment, the markdown render works like this:
In the The fix should be like this: move the |
Description
Escaping short links (
[[link]]
) does not work at the moment. Even if I type\[\[link\]\]
, Gitea still converts it into a link.This is probably due to how Markdown is handled in
markdown.go
:RenderRaw
seems to remove the escaping backslashes,PostProcess
then only sees a normal short link. Switching the order of the calls is also problematic becausePostProcess
converts links that it should not (for example, https://pthree.org/2012/04/17/install-zfs-on-debian-gnulinux/ is recognized as an issue link due to the numbers).The text was updated successfully, but these errors were encountered: