-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 callouts/attention blocks do not follow GitHub's behaviour with backslashes #31214
Comments
@yardenshoham |
cc @wxiaoguang as he last touched this code |
IIRC I didn't change the syntax for parsing, just kept the logic from #29121 : The new code still checks: I think the problem is related to the "unescaping" behavior. GitHub does the unescaping before parsing, so Gitea mayebe doesn't do unescaping, so it only sees For this case, I think it could be simply fixed by adding more checks in code, and add a proper test. |
Description
GitHub's markdown attention blocks discussed in #28316 and introduced in v1.22.0 with #21711 do not follow the same behaviour when the square brackets are escaped with backslashes.
I noted this issue when the
mdformat
tool corrected the syntax by escaping the square brackets. GitHub was dealing with this just fine but Gitea failed in this situation.Gitea Version
v1.22.0
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
Behaviour on GitHub
Note
testing note without backslash
Note
testing note with backslash
Behaviour on Gitea
Git Version
No response
Operating System
No response
How are you running Gitea?
Used https://demo.gitea.com as well as self-hosted
deb
package instance.Database
None
The text was updated successfully, but these errors were encountered: