-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add code to html conversions #2187
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Won't this match every |
In ...
code: (node: Node) => {
if (node is code block) {
return null;
}
return {
conversion: convertTextFormatElement,
priority: 0,
}
},
... cc @fantactuka, do you know if there's a good way to check if an incoming |
It will, but this still might be the right thing to do. CodeNode is not a core node, so this would allow us to handle pasted HTML code tags even if CodeNode is not registered. I think the full solution involves also adding a higher priority conversion on CodeNode/CodeHighlightNode, but I think it could be done in two PRs. Either way, we need some test coverage for this, which can be added here: EDIT: @tylerjbainbridge saw your other comment, I'm on the same page. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code It looks like <code> is inline by nature - maybe <pre> plus <code> is the formula for a code "block"? |
@tylerjbainbridge This adds tests, is this something we can get in for increased coverage? |
Addressed in #2607 |
close #2049