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

Markdown inside HTML doesn't parse #178

Closed
SyntaxRules opened this Issue Jul 20, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@SyntaxRules
Copy link
Member

SyntaxRules commented Jul 20, 2015

When there is markdown inside of html it doesn't seem to parse.

For example:

<div class="alert alert-info">
This is an **awesome** link to another site: [Internal to this website :)](/#/foo-bar).
</div>

renders as:

image

Using showdown v1.2.0.

Was this done by design? Or have we not had a need for it?

@tivie

This comment has been minimized.

Copy link
Member

tivie commented Jul 21, 2015

Actually, according to spec, elements inside html blocks should not be parsed by md engine. It is assumed anything inside an HTML block is already in HTML so it shouldn't need to be parsed.

The original markdown.pl, however, had a way of parsing HTML blocks by "marking" them with markdown="1".

Example:

# some markdown

blabla
<div>This is **not parsed**</div>
<div makrdown="1">This is **parsed**</div>

This was one of the project's original milestones. However, since no one has requested it yet I haven't thought of a way to implement it.

Do you think this is an important feature?

@SyntaxRules

This comment has been minimized.

Copy link
Member Author

SyntaxRules commented Jul 23, 2015

I would greatly enjoy this feature. My main use case is to be able to decorate markdown to look prettier. But I can understand why the original spec didn't make heavy provisions for it- markdown should be markdown, not markdown with html.

That being said github doesn't support this.

@rodrigogoncalves

This comment has been minimized.

Copy link

rodrigogoncalves commented Nov 19, 2015

@tivie, you say "according to spec". Which spec is that? Is that CommonMark's?

@tivie

This comment has been minimized.

Copy link
Member

tivie commented Nov 26, 2015

@tivie

This comment has been minimized.

Copy link
Member

tivie commented Jan 2, 2016

@SyntaxRules Added the feature just now to develop branch. Mind taking a look?

@tivie tivie closed this in c97f1dc Jan 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment