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

Support for HTML blocks (w/ tests) #98

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

dtao
Copy link

@dtao dtao commented Jul 2, 2013

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

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

@ksankaran
Copy link

Any idea when this change be merged?

@matthiasg
Copy link

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

@hrajchert
Copy link

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

@codingisacopingstrategy
Copy link

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

@ashb
Copy link
Collaborator

ashb commented Apr 7, 2014

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

dtao commented Apr 7, 2014

@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

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

aleray commented Apr 10, 2014

Very much interested in seeing this merged too!

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

ashb commented Jan 9, 2017

(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.

None yet

8 participants