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

Issue when mixing html with markdown #32

Closed
4 tasks done
MikeRenwick-ICG opened this issue Aug 1, 2024 · 3 comments
Closed
4 tasks done

Issue when mixing html with markdown #32

MikeRenwick-ICG opened this issue Aug 1, 2024 · 3 comments
Labels
🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on

Comments

@MikeRenwick-ICG
Copy link

MikeRenwick-ICG commented Aug 1, 2024

Initial checklist

Affected packages and versions

rehype-raw 7.0.0

Link to runnable example

https://codesandbox.io/s/rehype-raw-issue-yvcsts?file=/src/app.tsx

Steps to reproduce

const markdownSource = `
When using rehype-raw with React-Markdown

[This link doesn't work when a div is present](abc123) Nor does *markdown that follows*

until a double new line Hooray and Hurrah!
at which point
This link works again

It's almost as though it terminates treating the content as HTML at carriage returns instead of the closing HTML tag.
`;

Expected behavior

markdown parsing should resume from the closing tag (or whatever the HTML element is)

Actual behavior

It continues to treat the content as HTML, no longer parsing the markdown, until the next double carriage return \n\n

Runtime

Node v17

Package manager

yarn 3

OS

Windows

Build and bundle tools

Create React App

@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 Aug 1, 2024
@wooorm
Copy link
Member

wooorm commented Aug 1, 2024

Your markdown does not look good here. Please format correctly, use code blocks for code

@wooorm
Copy link
Member

wooorm commented Aug 1, 2024

This is how markdown works. See https://github.com/remarkjs/react-markdown#appendix-a-html-in-markdown:

Note: HTML in markdown is still bound by how HTML works in CommonMark. Make sure to use blank lines around block-level HTML that again contains markdown!

@wooorm wooorm closed this as not planned Won't fix, can't repro, duplicate, stale Aug 1, 2024
@wooorm wooorm added the 🙋 no/question This does not need any changes label Aug 1, 2024

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 Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants