wooorm / markdown-rs

CommonMark compliant markdown parser in Rust with ASTs and extensions

Home Page:https://docs.rs/markdown/1.0.0-alpha.17/markdown/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Markdown in HTML tags don't work

soupslurpr opened this issue · comments

Hello, thanks for this cool crate. I noticed that markdown in html tags do not work unless there is a character or more of text before the opening tag for each html tag. I also noticed it is like this in GitHub. Is this intended and could there be a way to make it work?

any text <p style="text-align: center;">
	**hello**
<p>

^ works as expected, centering and bolding "hello" with "any text" above it

any text 
<p style="text-align: center;">
	**hello**
<p>

^ Centering "hello" works, but bolding does not and the ** are visible.

Welcome @soupslurpr! 👋
markdown-rs builds on the CommonMark (https://commonmark.org/) and GitHub Flavored Markdown (GFM, https://github.github.com/gfm/) specifications.
The behavior you show, is as-described in the standard and is expected.

The way to make it work would be to customize markdown-rs using plugins #32
The design for plugins is still being ironed out, contributions towards moving plugins forward are welcome!

Closing this as the behavior described is expected, and plugin work is tracked in #32

Oh alright, that makes sense. Thanks for the quick response!