iamcco / iamcco/markdown-preview.nvim

Anchors do not work when the section header contains an emoji

Open
#623 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
8k
Forks
411
PR merge metrics
No merged PRs in 30d

Description

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

**Steps to reproduce the behavior**

A table of contents contains the link:

``` markdown
[🎯 Features](#-features)
```

The document contains the section header:

``` markdown
## 🎯 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:

``` none
https://github.com/#-features
```

Whereas this plugin produces:

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.