Re: Markdown generates invalid html for a list immediately followed by a quote

2007-07-17 Thread John Fraser

On 7/16/07, Michel Fortin [EMAIL PROTECTED] wrote:

  1. Test
  1. Test
  2. Test
  3. Test
  4. Test
  5. Test
  6. Test
  7. Test
  8. Test
  9. Test
 10. Test
  2. Test

Here, using John Fraser's suggested algorithm, subitem number 10
would be sent to the first list which is indented less, which means
between item 1 and 2 of the outer list.


Nope, item 10 would be correctly sent to the nested list.  It belongs
to the most recent list item that's indented less.  In other words,
item 1.

By belongs to I mean that it's a descendant of that node -- not a
sibling.  So item 10 is part of the list that's nested within item 1.

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


Re: Markdown generates invalid html for a list immediately followed by a quote

2007-07-12 Thread Michel Fortin

Le 2007-07-09 à 18:33, John Fraser a écrit :


To handle bizarre indentation, the rule should probably be that an
outdented list item belongs to the most recent list item that's
indented less.  So:

- level 1
  - level 2
   - level 2
 - level 3
- level 1


Would that work with right-aligned numbers? I think not.

 1. Test
 1. Test
 2. Test
 3. Test
 4. Test
 5. Test
 6. Test
 7. Test
 8. Test
 9. Test
10. Test
 2. Test

Surely there's a way to make that work, but it's certainly not going  
to be easy to explain how it works. (It'd be magic for most people.)  
I still believe the four spaces or one tab rule is easier to  
understand. If we're going to make a lot of incompatible changes,  
it'd be a good time to change Markdown so this rule works as expected.



Michel Fortin
[EMAIL PROTECTED]
http://www.michelf.com/


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


Re: Markdown generates invalid html for a list immediately followed by a quote

2007-07-08 Thread Michel Fortin

Le 2007-07-07 à 11:12, John Gruber a écrit :


That's what I'm thinking the output should be. I think there should be
an official rule that all block-level constructs must be separated by
a blank line.


I'm all for it. But wouldn't that compromise a lot of currently  
existing documents?



Michel Fortin
[EMAIL PROTECTED]
http://www.michelf.com/


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


Re: Markdown generates invalid html for a list immediately followed by a quote

2007-07-08 Thread Waylan Limberg

On 7/8/07, Michel Fortin [EMAIL PROTECTED] wrote:

Le 2007-07-07 à 11:12, John Gruber a écrit :


True, but if you read between the lines, it is already insinuated that
that is the way things work. I know that's the way I initially
understood it. It was only after a few errors (in my typing) that I
realized the extra line break isn't always necessary. I just
considered it sloppy typing -- I'd say that unless there is something
somewhere that specifically says it's supposed to work without the
blank line, then we should expect the blank line to be there. Anything
else is just a sloppy/lazy author, which we can't make exceptions for.
But maybe that's just me.

For that matter, I believe python already is pretty strict about
requiring the blank line between any block-level constructs. There may
be an exception or two in a few minor edge cases, but that's it. I'd
say python is ahead of the curve on this one.


--

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


Re: Markdown generates invalid html for a list immediately followed by a quote

2007-07-08 Thread Fletcher T. Penney


On Jul 8, 2007, at 6:47 PM, Michel Fortin wrote:


Le 2007-07-07 à 11:12, John Gruber a écrit :

That's what I'm thinking the output should be. I think there  
should be

an official rule that all block-level constructs must be separated by
a blank line.


I'm all for it. But wouldn't that compromise a lot of currently  
existing documents?


I say evaluate the decision on its own merits  Worrying too much  
about existing documents could be a bit of the throwing good money  
after bad phenomenon...


F-

--
Fletcher T. Penney
[EMAIL PROTECTED]

If you had a million Shakespeares, could they write like a monkey?
- Steven Wright




smime.p7s
Description: S/MIME cryptographic signature
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Markdown generates invalid html for a list immediately followed by a quote

2007-06-13 Thread Matt Kraai
Howdy,

The attached patch prevents Markdown from generating invalid HTML if a
list is followed immediately by a quote, e.g.,

* foo
 bar
 baz

-- 
Matt
diff -Nru /tmp/ZHVRVKY7mc/markdown-1.0.2~b8/Markdown.pl 
/tmp/dDW4tYqXOK/markdown-1.0.2~b8/Markdown.pl
--- /tmp/ZHVRVKY7mc/markdown-1.0.2~b8/Markdown.pl   2007-06-12 
22:58:14.0 -0700
+++ /tmp/dDW4tYqXOK/markdown-1.0.2~b8/Markdown.pl   2007-06-12 
22:58:15.0 -0700
@@ -858,6 +858,11 @@
  ( 
# $4
  \z
|
+ \n
+ (?=   # 
Lookahead for a blockquote
+   [ \t]*
+ )
+   |
  \n{2,}
  (?=\S)
  (?!   # 
Negative lookahead for another list item marker
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss