Skip to content

toc.follow not work with Chinese characters #5211

@jeremy-feng

Description

@jeremy-feng

Context

I just installed the latest insider-4.32.3. But I found that the Chinese toc is now not scrolling with page.

This issue occurs in insider-4.32.3. However, when I installed insider-4.32.0, everything became fine.

Bug description

  1. If the head text is all in English, then when I scroll to that head, the table of contents also scrolls to the position of the head. It works well.
  2. However, if the head contains any Chinese characters, then the table of contents does not automatically scroll to the position of the head.
  3. If I click on the Chinese head in the table of contents, then the url in the browser will display Chinese shortly and then immediately disappear.
  4. If I click on the same Chinese head in the table of contents again, then the url in the browser will remain.

Related links

Reproduction

chinese-toc-follow-not-working.zip

Steps to reproduce

  1. Install mkdocs-material insider 4.32.3
  2. run mkdocs serve

Browser

Chrome

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions