-
Notifications
You must be signed in to change notification settings - Fork 19
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
Rendering Markdown in Enhance #202
Conversation
Signed-off-by: macdonst <simon.macdonald@gmail.com>
Signed-off-by: macdonst <simon.macdonald@gmail.com>
related: an old entry I wrote about using custom elements in Markdown. maybe it can be repurposed as an aside here or a sub-document |
@tbeseda Yes, I think an aside letting folks know they can use custom-elements in their markdown is a good idea. |
Signed-off-by: macdonst <simon.macdonald@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions for consistency/tone/etc! Nice work!
Signed-off-by: macdonst <simon.macdonald@gmail.com>
Co-authored-by: Cole Peters <cole@colepeters.com>
Signed-off-by: macdonst <simon.macdonald@gmail.com>
### Render order matters | ||
|
||
When rendering HTML from Markdown that includes custom elements the rendering order matters. First, render the markdown to HTML with Arcdown then "enhance" that HTML by running it through Enhance SSR before sending it to the browser. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel it would be good to add a few words as to why.
Something like:
since Enhance expands custom elements that would not be present in the markup until after markdown converts the source into HTML.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the main worry is when the custom element is expanded it creates valid html which cannot be parsed by the markdown parser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that is true as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should just say that Enhance produces a full HTML page and not a HTML snippet like Arcdown does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this section after chatting about it in Enhance sync
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is thorough. Hopefully this clears up any confusion for folks.
Co-authored-by: Cole Peters <cole@colepeters.com>
We've seen folks searching for Markdown and Enhance so I'm trying to surface our solution on enhance.dev.