Heading anchor links open in a new tab when heading contains CJK languages
### Summary When a Markdown heading contains non-ASCII characters (e.g. Japanese, Chinese, Korean), clicking its anchor link opens a new tab instead of navigating within the same page: ![anchor-new-tab-cjk](/uploads/a376b8e1586314343d60a1ce9bfff933/anchor-new-tab-cjk.mov){width=671 height=450} ### Steps to reproduce 1. Write a heading containing non-ASCII characters in Markdown 1. Click the anchor icon to the right of the heading: #### Reproduction Heading - 再現用の見出しです ### What is the current *bug* behavior? `target="_blank"` and `rel="nofollow noreferrer noopener"` are incorrectly applied: ```html <a href="#reproduction-heading---再現用の見出しです" class="anchor" rel="nofollow noreferrer noopener" target="_blank"></a> ``` ![image](/uploads/33a662be76b8dadee35d95e4442d76fe/image.png){width=791 height=79} ### What is the expected *correct* behavior? `target="_blank"` should not be present. This is a same-page anchor link, just like headings with ASCII-only text: ```html <a href="#reproduction-heading---再現用の見出しです" class="anchor"></a> ``` ![image](/uploads/f66992afb0655dee0a978111d9243256/image.png){width=472 height=78} ### Output of checks This bug happens on GitLab.com
issue