Skip to content

Filter NUL bytes as required by the commonmark spec#1087

Open
notriddle wants to merge 2 commits into
pulldown-cmark:mainfrom
notriddle:nul
Open

Filter NUL bytes as required by the commonmark spec#1087
notriddle wants to merge 2 commits into
pulldown-cmark:mainfrom
notriddle:nul

Conversation

@notriddle

Copy link
Copy Markdown
Collaborator

Fixes #1065

Obsoletes #1066

rhysd and others added 2 commits April 24, 2026 13:20
because it is required by the CommonMark specification:
https://spec.commonmark.org/0.31.2/#insecure-characters
The simplest way to find it is to look for `.is_in_table()`,
since everywhere that needs to worry about this also needs to
worry about `\|`, which does similar preprocessing.

There's probably a less repetitive way to handle all this.
@Martin1887

Copy link
Copy Markdown
Collaborator

Looks good to me!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

U+0000 must be replaced with U+FFFD to conform CommonMark spec

4 participants