Skip to content

Add an emoji in the first level section title broke the page title when scrolling #5893

@Enn83

Description

@Enn83

Context

Hi!

I recently upgraded mkdocs-material from 9.0.15 to 9.2.3 (and mkdocs from 1.4.2 to 1.5.2) and I notice that all pages where the title depends on the markdown section and include an emoji are shifted downwards.

A markdown section is something like that:

# Intégration et Déploiement Continu sur :simple-gitlab: Gitlab

Bug description

When adding an emoji in a first level section title in the markdown page, I expect mkdocs-material to display, at least, the emoji code (for example :simple-gitlab:). It should looks like that:

Capture d’écran 2023-08-24 154410

... or even display the emoji (if typeset plugin is not needed, otherwise the emoji code is sufficient).

But since the mkdocs-material update, it now looks like that:

262990551-07eea56f-4224-4739-b70e-97467274e8e7

(Private informations in the screen are hidden)

Related links

  • The typeset plugin,
  • I didn't find a page in the documentation where an emoji was in the title and displayed while scrolling...

Reproduction

I made this minimal reproductible example .zip file:

mkdocs-material-emoji-title-bug.zip
Edit: More minimal example.

Note : I tried using the step described in Creating a reproduction and adding plugins: - info, but it gave me an importlib.metadata import error while doing mkdocs serve or mkdocs build, so I made the zip file at hand.

Steps to reproduce

  1. Download the .zip file and unzip it, then go inside.
  2. Go inside the mkdocs/ folder.
  3. Type pipenv install in a terminal (to install packages in virtualenv),
  4. ... and type pipenv shell (to enable this virtualenv).
  5. Then type mkdocs serve.
  6. Open a browser in http://127.0.0.1:8000/.
  7. Scroll down in the main page.

You should notice the page title bug because of the emoji.

Browser

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugupstreamIssue must be taken upstream

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions