Jump to Header in Chinese can not work

fjchen7's Avatar


11 Oct, 2018 12:54 PM

(It seems that my previous post disappear)

Jump to header in page like [jump](#你好) in Chinese does not work.
But in English like [jump](#hello) works well.

Can this problem be fixed?

  1. Support Staff 1 Posted by Brett on 11 Oct, 2018 01:59 PM

    Brett's Avatar

    Sorry, these were getting spammed. When a headline contains non-latin characters, the ID is converted to a hex representation, but internally Marked strips out the % in the preview, so 你好 becomes E4BDA0E5A5BD. A jump link would need to go to [jump](#E4BDA0E5A5BD) to work. Unfortunately, right now the HTML export keeps the %, so that link would cease to work after export. Right now, it's best to accept that the jump links won't work inside of Marked, but will when HTML is exported.

  2. 2 Posted by fjchen7 on 12 Oct, 2018 03:32 AM

    fjchen7's Avatar

    Why do you unify the source code between preview inside Marked and HTML export?

  3. Support Staff 3 Posted by Brett on 12 Oct, 2018 03:49 PM

    Brett's Avatar

    Because Marked does a lot of magic in the preview, including generating the table of contents, collapsing sections by header, bookmarking locations, navigate forward/back through headers, etc., it needs the header id to be as parseable as possible. It modifies the headers in the preview using JavaScript rather than actually changing the source code, so what gets output is usually what the user actually expects to see.

    One option while you're in the preview is just to scroll to the table of contents and type Shift-1, then you can just hit "1" at any point to jump back to it (bookmark feature). Your jump links will work in the export, but your navigation in the preview will be even faster.

    - Brett

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac