Skip to content
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
Closed

Markdown inside HTML doesn't parse #178

SyntaxRules opened this issue Jul 20, 2015 · 5 comments
Assignees

Comments

@SyntaxRules
Copy link
Member

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
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
Copy link
Member Author

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
Copy link

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

@tivie
Copy link
Member

tivie commented Nov 26, 2015

@rodrigogoncalves No, the original official spec, https://daringfireball.net/projects/markdown/

@tivie
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 as completed in c97f1dc Jan 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants