I understand that Discourse is CommonMark complaint, so I took the suggestion of one of the threads to use html2commonmark to try and migrate a few posts.
I’ve noticed some issues:
Doesn’t render properly, the “encoder” is missing all together and renders as:
One needs to put a space after the < for it to render properly
EDIT: Any workaround for now on how to get it to render without including a space?
<enc>-vid which produces <enc>-vid
Thanks I’m assuming that’s the workaround I asked for. Would this issue be fixed to be compliant with the commonmark syntax? I have a lot of references to this type of issue on the pages I’m converting using the html2commonmark tool.
Unfortunately no. Commonmark supports the embedding of HTML markup inside it. So when using phrases with
> around them, you must escape one of them for it to be shown or put it in backticks
The tool escaped both the
> but it doesnt seem to show (see above). Even if only one is escaped it doesn’t show up. It only shows up if there is a
space after the first
<. For some reason the entire text between the
> goes missing. Is that expected?
You can’t escape
< using \
You have to use the entity or put it in `
\ can only escape markdown syntax
Okay got that, I’m still missing 2 things:
If commonmark allows for HTML markup, are you saying that
< is considered HTML mark up hence it’s needs to be
< instead? If so then why is it that this works
< enc> but not
<enc> to show the
Why is the text between the
> disappearing but show up when there is a space?
Maybe I’m missing something here but it’s not clear why the space is making such a difference overall.
Yes. The latter (with a space) isn’t valid html, thus it doesn’t get parsed.
See my response above
So when I run the same markup through
It works fine, would you say that is a bug in the interactive markup editor on the specifications website or is there something else going on here?
<enc> valid HTML? Just wondering why html2commonmark AND the commonmark specifications website both consider this valid commonmark code?
Any tag can be valid html, depending on the schema referenced. However, discourse is not currently making use of the commonmark spec.
It will be soon though. So this may become a non issue in a few more weeks.
I have commenced our migration to
markdown-it , all rejoice
I already have it working on a branch, but so many of our extensions are broken that I do not want to subject everyone on meta to it quite yet.
Phase 1 - get this running on meta (underway)
The first phase of the migration to the new engine is getting us ready to turn markdown-it on a…
Odds are this is fixed there, really no point discussing this unless also an issue there.
Excellent, I did see that thread before posting but wasn’t sure if this would be addressed. Looks like it’s working great there.
We now have the new engine enabled on meta, will take a few more weeks prior to it being rolled out globally.