Skip to content

Page title drops a trailing # from the heading, e.g. # Learn C# becomes "Learn C" (AI-assisted) #12644

Open

Description

@0xvikram

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

a doc with no title in its front matter and the heading # Learn C# gets the browser title, sidebar label and pagination label "Learn C". The heading on the page itself still shows "Learn C#"

Reproducible demo

No response

Steps to reproduce

create a doc containing only # Learn C# and some text, build the site, and look at the <title> tag and the sidebar.

Expected behavior

"Learn C#". The CommonMark spec says a closing # only counts when a space or tab comes before it; its own example # foo# renders as "foo#".

Actual behavior

"Learn C"

Your environment

  • Public source code:
  • Public site URL:
  • Docusaurus version used:
  • Environment name and version (e.g. Chrome 89, Node.js 16.4):
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS):

Self-service

  • I'd be willing to fix this bug myself.

Activity

  1. added
    bugAn error in the Docusaurus core causing instability or issues with its execution
    status: needs triageThis issue has not been triaged by maintainers
    on Oct 13, 2026
  2. Josh-Cena commented on Oct 13, 2026

    @Josh-Cena
    Collaborator

    I have tried creating a repro with https://new.docusaurus.io/.

    You checked this box. Can you provide a reproduction?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executionstatus: needs triageThis issue has not been triaged by maintainers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions