Closed exklamationmark closed 10 years ago
Hi @exklamationmark
That appears to be correct markdown behaviour. Anything in <div>
blocks (unless it has the attribute markdown="1"
) is ignored and treated as HTML. When writing code in HTML you have to add in the necessary escaping as <code>
and <pre>
tags only provide styling.
Obviously that's inconvenient and goes against the whole purpose of markdown - but you can have highlight.js without adding the necessary <div
> and <code
> tags. There is this plug-in: https://github.com/mczenko/wp-markdown-code-highlighting-options
I see, that works really well. thanks Stephen :)
Hi Stephen,
Thanks for the great plugin. It boost my writing speed up a lot :)
I often write code in the blog as well, and use highlight.js to color it. Highlight.js requires me to have a class for the
<code>
tag for language detection. Thus, I am using this workaround with WP-Markdown:original content (before save)
After the first save, it was stored as this HTML
It seems the
<
character was not escaped, and thus it disappear when showing on the page. Furthermore, when the HTML is converted back to editing, it shows up in the escaped formOn edit
I think it should be escaped in the HTML and converted back during edit.
What do you think?