iamcco / markdown-preview.nvim

markdown preview plugin for (neo)vim
MIT License
6.82k stars 284 forks source link

Anchors do not work when the section header contains an emoji #623

Open pmatulis opened 11 months ago

pmatulis commented 11 months ago

Anchors do not work when the section header contains an emoji.

Steps to reproduce the behavior

A table of contents contains the link:

[🎯 Features](#-features)

The document contains the section header:

## 🎯 Features

Expected behaviour

When rendered using GitHub (or some other Markdown viewer) clicking on the table of contents link transports the user to the corresponding header.

Actual behaviour

The link does not work.

On GitHub the header link is:

https://github.com/<blah>#-features

Whereas this plugin produces:

http://localhost:8709/1#-features