Skip to content

Bug Report: Instant Preview fails to load for headers containing Chinese characters (Non-ASCII anchors) #74

@jasonatcb

Description

@jasonatcb

Context

No response

Bug description

The Zensical Instant Preview feature fails to trigger or load correctly when a link points to a specific header (anchor) that contains Chinese characters. While standard page-level previews and English-character header previews work as expected, links using Chinese anchors do not render the preview overlay.

Related links

Reproduction

reproduction.zip

Steps to reproduce

  1. Initialize a Zensical project with the zensical.extensions.preview extension enabled.
  2. Create a target file (e.g., test.md) with a Chinese heading: ## 中文錨點.
  3. On the index page, create a link to that heading using the { data-preview } attribute:
    Test Link{ data-preview }.
  4. Run uv run zensical serve and hover over the link.

Browser

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions