-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
anchors don't work when contains punctuation marks just like (
or (
#26367
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
Comments
What's the impact of this problem? |
Sometimes we need to use section titles like this: However, the malfunction of the anchors pointing to them makes reading somewhat difficult. |
(
Thanks for the report, I understand the problem, besides |
(
(
or (
Yes. I also test #### test(0)
#### test!1
#### test:2
#### test*3
#### test!4
#### test:5 giteagithub |
I've located the code for this problem, it has to do with the
|
github |
Can you help me write some test cases from github to verify that the logic of the cheanValue function is consistent with github? |
This one is also related: Different behaviors when generating Markdown links for headings containing punctuations and other symbols #19745 Quote the old comment from that issue: I would say it's more like a There are various characters would be removed&replaced during URL generation. For example, the single quote
Since there is no standard, so there is no right or wrong, as long as it works. Maybe the answer to the question could be: if there is a definition in CommonMark, then make upstream |
I understand what you're saying, and it's not a bug. But do we need to adjust it so that github/vscode is consistent? |
Just to share the information from old issues. I am neutral for it. |
Got that. Sure it is not a bug, but it seems that the logic of github is more straightforward and easier to use. |
Yes. That's right, but github |
These test cases are the ones I got from github, of course they are correct. What I mean is can you help me to add some more test cases? |
Ok. Below is the examples I tested on github [
["tes()", "tes"],
["tes…@a", "tesa"],
["tes¥& a", "tes-a"],
["tes= a", "tes-a"],
["tes|a", "tesa"],
["tes\a", "tesa"],
["tes/a", "tesa"]
] |
Description
Markdown Heading ID contains Unicode
(
is inconsistent with Github.For
#### test(1)
in gitea , the id is"user-content-test-1"
and in github it is"user-content-test1"
The markdown below is available for jumping on github, but not for gitea.
gitea
id = "user-content-test-1"
github
id = "user-content-test1"
Gitea Version
1.20.2
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
I was able to reproduce it using try.gitea.io.
Database
None
The text was updated successfully, but these errors were encountered: