RFC: Remove p Paragraph Tags between li Tags

2013-11-23 Thread Mariusz Wojcik
li[Home](/)/li
li[About Me](/about-me.html)/li
li[Projects](/projects.html)/li

creates

plia href=/Home/a/li
lia href=/about-me.htmlAbout Me/a/li
lia href=/projects.htmlProjects/a/li/p

Is this a bug or a feature? I think it shouldn't be that way because the p 
Tags around `li`s are illegal.
Greetings,
Mariusz Wojcik
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: RFC: Remove p Paragraph Tags between li Tags

2013-11-23 Thread Deirdre Saoirse Moen
On Nov 23, 2013, at 1:42 PM, Mariusz Wojcik mdickie...@gmail.com wrote:

li[Home](/)/li
li[About Me](/about-me.html)/li
li[Projects](/projects.html)/li
 
 creates
 
plia href=/Home/a/li
lia href=/about-me.htmlAbout Me/a/li
lia href=/projects.htmlProjects/a/li/p
 
 Is this a bug or a feature? I think it shouldn't be that way because the p 
 Tags around `li`s are illegal.

Why are you doing half-Markdowny?

* [Home](/)
* [About Me](/about-me.html)
* [Projects](/projects.html)

generates

ul
lia href=/Home/a/li
lia href=/about-me.htmlAbout Me/a/li
lia href=/projects.htmlProjects/a/li
/ul

...which is legal and expected.

I think being more idiomatic is to your benefit here.

Deirdre
http://deirdre.net/
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: RFC: Remove p Paragraph Tags between li Tags

2013-11-23 Thread Waylan Limberg
On Saturday, November 23, 2013, Mariusz Wojcik wrote:

 li[Home](/)/li
 li[About Me](/about-me.html)/li
 li[Projects](/projects.html)/li

 creates

 plia href=/Home/a/li
 lia href=/about-me.htmlAbout Me/a/li
 lia href=/projects.htmlProjects/a/li/p

 Is this a bug or a feature? I think it shouldn't be that way because the
 p
 Tags around `li`s are illegal.


As the docs [1] state: “Markdown is smart enough not to add extra
(unwanted) `p` tags around HTML block-level tags.” The key there is
“block-level tags” which `li`s are not ( go ahead and check the HTML spec
on that). If you want to create raw HTML lists, then you need to wrap them
in the appropriate block-level tag yourself.

This is a case of garbage in - garbage out. When you're using raw HTML, you
need to use valid HTML. Markdown will not fix your invalid HTML for you.
So, in your case, a `li` not in a `ol` or `ul` in not valid HTML.
Therefore markdown doesn't fix it to make it valid. Markdown's
understanding of HTML is way to limited for that.

Hope that explains things for you.

[1]: http://daringfireball.net/projects/markdown/syntax#html


-- 
Waylan Limberg
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss