-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Unencoded header links didn't work. #1749
Comments
Probably has something to do with your browser. We don't manually handle the URL fragments. For me, both are working fine on Chrome 108: https://stackblitz.com/edit/vite-kdiy46?file=docs%2Fexample.md 407cb01215.mp4 |
In the html source I built, the address is encoded differently as follows. <!-- [한글](#한글-한글) to -->
<a href="#%ED%95%9C%EA%B8%80-%ED%95%9C%EA%B8%80">한글</a>
<!-- [한글](#%E1%84%92%E1%85%A1%E1%86%AB%E1%84%80%E1%85%B3%E1%86%AF-%E1%84%92%E1%85%A1%E1%86%AB%E1%84%80%E1%85%B3%E1%86%AF) to -->
<!-- This address was encoded by copy pasting from the browser address bar. -->
<a href="#%E1%84%92%E1%85%A1%E1%86%AB%E1%84%80%E1%85%B3%E1%86%AF-%E1%84%92%E1%85%A1%E1%86%AB%E1%84%80%E1%85%B3%E1%86%AF">한글</a> |
I'm not completely sure, but there is an issue with the text in your first link. Copy paste this: PS: it looks like second one is using multiple characters to represent a single letter. (VitePress is generating ids having those, even if the source has unicode stuff). The string normalization is causing this: https://github.com/mdit-vue/mdit-vue/blob/main/packages/shared/src/slugify.ts#L11 |
Describe the bug
Unencoded header links (with CJK characters) do not work.
I remember it worked fine in VuePress, but it doesn't work in VitePress.
Reproduction
Expected behavior
Creating links with native headers should also work.
System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: