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

Escaping "#" at the end of heading #1029

Open
Djordjenp opened this issue Jun 19, 2024 · 1 comment
Open

Escaping "#" at the end of heading #1029

Djordjenp opened this issue Jun 19, 2024 · 1 comment

Comments

@Djordjenp
Copy link

Djordjenp commented Jun 19, 2024

Hello I looked into your library and I found if we pass string like "# Hello World \#" we get back header with text token "Hello World" so escaping hash is skipped because of this line in "heading" tokenizer:

  const tmp = state.skipCharsBack(max, 0x23, pos) // #

Is this how it's suppose to work because when I passed same string to "commonmark" demo, it got rendered like "Hello World #"

@rlidwka
Copy link
Member

rlidwka commented Jun 23, 2024

the output looks the same to me:

$ echo -e '# Hello World \#' | deno run --allow-read npm:[email protected]
<h1>Hello World #</h1>
$ echo -e '# Hello World \#' | deno run --allow-read npm:[email protected]
<h1>Hello World #</h1>

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

No branches or pull requests

2 participants