Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML entity is mangled #1251

Closed
4 tasks done
Porges opened this issue Oct 26, 2023 · 4 comments
Closed
4 tasks done

HTML entity is mangled #1251

Porges opened this issue Oct 26, 2023 · 4 comments
Labels
👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on

Comments

@Porges
Copy link

Porges commented Oct 26, 2023

Initial checklist

Affected packages and versions

at least 15.0.1, 14.0.2

Link to runnable example

Steps to reproduce

Create a Markdown file:

# test󠄃

Run remark on it.

Expected behavior

Output should preserve the HTML entity or change it to non-entity form.

Actual behavior

HTML entity is changed to a completely different character:

# test

片ă

Note that I don't recall this happening with past versions, so it might have been introduced (fairly) recently.

This will be a bug in mdast-util-{from,to}-markdown, but I’m not sure which.

Runtime

Node v16

Package manager

npm 8

OS

Windows, Linux

Build and bundle tools

No response

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Oct 26, 2023
@Porges
Copy link
Author

Porges commented Oct 26, 2023

This is also present when just using micromark:

import {micromark} from 'micromark';
console.log(micromark('片󠄃'));
> node test.mjs                                                                            
<p>片ă</p>

@Porges
Copy link
Author

Porges commented Oct 26, 2023

Sent a PR fixing this to the micromark repo: micromark/micromark#158

@wooorm wooorm added the 👀 no/external This makes more sense somewhere else label Oct 27, 2023
@wooorm
Copy link
Member

wooorm commented Oct 27, 2023

Thanks!

@github-actions

This comment has been minimized.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants