Skip to content

Support for HTML blocks (w/ tests)#98

Open
dtao wants to merge 2 commits into
evilstreak:masterfrom
dtao:master
Open

Support for HTML blocks (w/ tests)#98
dtao wants to merge 2 commits into
evilstreak:masterfrom
dtao:master

Conversation

@dtao

@dtao dtao commented Jul 2, 2013

Copy link
Copy Markdown

This is almost the same change @marijnh submitted 2 years ago in #34, but with a few differences:

  • tests for @marijnh's HTML block commit
  • support self-closing HTML tags
  • default to code blocks where indented

- tests for @marijnh's HTML block commit
- support self-closing HTML tags
- default to code blocks where indented
@dtao dtao mentioned this pull request Jul 2, 2013
dtao added a commit to dtao/dtao.github.io that referenced this pull request Jul 2, 2013
also updated markdown.js (see evilstreak/markdown-js#98) to make
the iframe work
@vanthome

Copy link
Copy Markdown

Why is this not merged yet?
According to the Spec of markdown, HTML tags must be supported.

@ksankaran

Copy link
Copy Markdown

Any idea when this change be merged?

@matthiasg

Copy link
Copy Markdown

good question.. this is sadly not in accordance with markdown specs ... any specific reason why ?

@hrajchert

Copy link
Copy Markdown

Is this going to be merged? it would be nice to have html tags

@codingisacopingstrategy

Copy link
Copy Markdown

Hey it would nice to know what’s blocking here, any way we can help out?
Thanks—

@ashb

ashb commented Apr 7, 2014

Copy link
Copy Markdown
Collaborator

A few things:

  1. check it works for you and doesn't have any edge cases or odd behavior

  2. Work out what we want to do in cases like this:

    <div>This *is still* markdown in some parsers and should be parsed as such.</div>
    

(I'm not hugely happy with the idea of a __RAW block in HTML but eh, I'll live)

@dtao

dtao commented Apr 7, 2014

Copy link
Copy Markdown
Author

@ashb:

  1. What would you like to see? This commit passes tests, and from my usage works fine. Do you want screenshots? Perhaps some canonical sites using markdown-js that we could verify still work correctly with this change?
  2. My opinion is that Markdown embedded within raw HTML blocks should not be supported. I think this is a pretty justified position given it's what Gruber specified in the original documentation:

Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can’t use Markdown-style emphasis inside an HTML block.

I agree that __RAW looks pretty ugly, but given my position on point 2 above, I think the term "raw" actually makes a lot of sense as it implies no additional processing (hence no embedded Markdown).

@codingisacopingstrategy

Copy link
Copy Markdown

I’d also follow Gruber, especially if it is the behaviour that already works now, and is followed in many other implementations.

If someone has a need for Markdown processing in HTML tags they can always try and do a pull request after… It could be an option, or like in python-markdown an attribute you specify on the HTML.

cheers,

@aleray

aleray commented Apr 10, 2014

Copy link
Copy Markdown

Very much interested in seeing this merged too!

@sir-ragna sir-ragna mentioned this pull request Dec 1, 2016
@ashb

ashb commented Jan 9, 2017

Copy link
Copy Markdown
Collaborator

(I'm not expecting the original author to pick this up as I've let it languish for years. Just for the record)

This patch goes someway to addressing HTML support but doesn't account for inline html elements Hi I am <em>html</em>.

Additional in #279 the case was made that HTML support should not be on by default and I'm tempted to agree.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants