Re: pre in lists

2012-08-18 Thread Sherwood Botsford
There may be merit in having a section in the docs that reviews the use of
white space.  I know it's caught me several times.

Respectfully,

Sherwood of Sherwood's Forests

Sherwood Botsford
Sherwood's Forests --  http://Sherwoods-Forests.com
780-848-2548
50042 Range Rd 31
Warburg, Alberta T0C 2T0




On 17 August 2012 21:10, Boris Le Ninivin  wrote:

> On 08/17/2012 08:43 PM, Rob McBroom wrote:
>
>> On Aug 17, 2012, at 10:28 AM, Boris Le Ninivin 
>> wrote:
>>
>>  That works like a charm. It was missing the newline, I guess...
>>>
>> If only someone had said “there needs to be an empty line before the
>> first line of code”. ;-)
>>
>>  Well, it wasn't emphased enough, I guess... I didn't see you've written
> it until you pointed it out in this last mail. Hence the need for clear and
> well detailled documentations ;)
>
> But anyway, thank you very much for having given the solution in the first
> place. I only wish I wouldn't be that used to stop reading after I find the
> (sometimes partial) answer to my question.
>
> And just a note if it can help you to help people : at first, I tried the
> solution Waylan gave me (so the one you gave me too then) BEFORE inserting
> a newline between the list and the code block. I was writing an answer
> saying "sorry, it don't work either..." when I noticed the newline in his
> code, and read his explanation. And the reason why I didn't insert a new
> line before was : to me a new line would have broke the list, making two
> successive ol instead of one. I'm not saying it's a design problem, but to
> me it's not that consistent with the rest of the syntax.
>
> I guess I might have missed the point about indentation to keep text in
> the same "block" ;)
>
> Many thanks for everything, guys.
>
> __**_
> Markdown-Discuss mailing list
> Markdown-Discuss@six.pairlist.**net 
> http://six.pairlist.net/**mailman/listinfo/markdown-**discuss
>
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: pre in lists [ERRATA]

2012-08-17 Thread Boris Le Ninivin

in the third paragraph, I meant "WITHOUT" and not "BEFORE".

I don't know what I've written this...
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: pre in lists

2012-08-17 Thread Boris Le Ninivin

On 08/17/2012 08:43 PM, Rob McBroom wrote:

On Aug 17, 2012, at 10:28 AM, Boris Le Ninivin  
wrote:


That works like a charm. It was missing the newline, I guess...

If only someone had said “there needs to be an empty line before the first line 
of code”. ;-)

Well, it wasn't emphased enough, I guess... I didn't see you've written 
it until you pointed it out in this last mail. Hence the need for clear 
and well detailled documentations ;)


But anyway, thank you very much for having given the solution in the 
first place. I only wish I wouldn't be that used to stop reading after I 
find the (sometimes partial) answer to my question.


And just a note if it can help you to help people : at first, I tried 
the solution Waylan gave me (so the one you gave me too then) BEFORE 
inserting a newline between the list and the code block. I was writing 
an answer saying "sorry, it don't work either..." when I noticed the 
newline in his code, and read his explanation. And the reason why I 
didn't insert a new line before was : to me a new line would have broke 
the list, making two successive ol instead of one. I'm not saying it's a 
design problem, but to me it's not that consistent with the rest of the 
syntax.


I guess I might have missed the point about indentation to keep text in 
the same "block" ;)


Many thanks for everything, guys.
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: pre in lists

2012-08-17 Thread Rob McBroom
On Aug 17, 2012, at 10:28 AM, Boris Le Ninivin  
wrote:

> That works like a charm. It was missing the newline, I guess...

If only someone had said “there needs to be an empty line before the first line 
of code”. ;-)

-- 
Rob McBroom


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


Re: pre in lists

2012-08-17 Thread Boris Le Ninivin

On 08/17/2012 03:57 PM, Waylan Limberg wrote:

On Fri, Aug 17, 2012 at 3:57 AM, Boris Le Ninivin
 wrote:
[snip]

Thank you for your suggestion. However, I use ikiwiki, and, if I do so, it's
to avoid using php, ruby or anything else ;)

So, I'll rather patch ikiwiki than install a hanful of packages to solve a
simple problem ;)


Well, as far as I can tell, ikiwiki is written in Perl. Not sure which
perl implementation it uses (there are 3 IIRC), but I believe all of
them implement nested code blocks properly. Perhaps you are providing
bad input? What you should have is:

~
1. some text
2. some code :

 My first line of code
 The second one
 Some indented code
 Another line
3. end of the list
~

Note the blank line before the block and at least 8 spaces of indent.
That is the only way to nest a standard markdown style code block
inside a list.

Remember, without the blank line, you just add more inline text to the
list item and with only 4 spaces of indent you only get a paragraph
inside a list:


1. First line of first paragraph in list item.
 Second line of first paragraph in list item (indented 4 spaces).

 Second paragraph of first list item (indented 4 spaces).
 Second line of second paragraph (indented 4 spaces).

 A code block nested in list item (indented 8 spaces).

 Another paragraph nested in list item (indented 8 spaces).

2. A new list item.


Hope that helps.


Hey! Thank you!

That works like a charm. It was missing the newline, I guess...
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: pre in lists

2012-08-17 Thread Waylan Limberg
On Fri, Aug 17, 2012 at 3:57 AM, Boris Le Ninivin
 wrote:
[snip]
>
> Thank you for your suggestion. However, I use ikiwiki, and, if I do so, it's
> to avoid using php, ruby or anything else ;)
>
> So, I'll rather patch ikiwiki than install a hanful of packages to solve a
> simple problem ;)
>

Well, as far as I can tell, ikiwiki is written in Perl. Not sure which
perl implementation it uses (there are 3 IIRC), but I believe all of
them implement nested code blocks properly. Perhaps you are providing
bad input? What you should have is:

~
1. some text
2. some code :

My first line of code
The second one
Some indented code
Another line
3. end of the list
~

Note the blank line before the block and at least 8 spaces of indent.
That is the only way to nest a standard markdown style code block
inside a list.

Remember, without the blank line, you just add more inline text to the
list item and with only 4 spaces of indent you only get a paragraph
inside a list:


1. First line of first paragraph in list item.
Second line of first paragraph in list item (indented 4 spaces).

Second paragraph of first list item (indented 4 spaces).
Second line of second paragraph (indented 4 spaces).

A code block nested in list item (indented 8 spaces).

Another paragraph nested in list item (indented 8 spaces).

2. A new list item.


Hope that helps.

-- 

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


Re: pre in lists

2012-08-17 Thread Boris Le Ninivin

On 08/17/2012 05:24 AM, Lou Quillio wrote:

On Thu, Aug 16, 2012 at 10:26 AM, Boris Le Ninivin
 wrote:

On 08/16/2012 02:43 PM, Rob McBroom wrote:

On Aug 16, 2012, at 5:45 AM, Boris Le Ninivin 
wrote:


When I try to use the code block syntax in a list, i.e :

1. some text
2. some code :
 My first line of code
 The second one
 Some indented code
 Another line
3. end of the list

it doesn't work. Yet it appears that the syntax is valid (I checked on
the w3 validator). I would need that functionality. Would it be possible to
improve the markdown parser by adding it ?

Code blocks in list items need to be indented 8 spaces instead of 4, and
(for some implementations anyway) there needs to be an empty line before the
first line of code. I think that's documented somewhere, but I'm too lazy to
check.


Well, the implementation I user (ikiwiki) doesn't support that, so I use :


1. some text
2. some code :
`My first line of code`
`The second one`

`Some indented code`
`Another line`

3. end of the list

My problem now is that when I want to add a not after the blockquote, either
it's a the SAME level as the blockquote:


1. some text
2. some code :
`My first line of code`
`The second one`

`Some indented code`
`Another line`

(note)

3. end of the list

or it breaks the list:


1. some text
2. some code :
`My first line of code`
`The second one`

`Some indented code`
`Another line`


(note)


3. end of the list

Do you have an idea on how to do that ?

Relying on indentation for code blocks will disappoint you endlessly.
Better to use a transformer that supports fenced code blocks. Run this
through kramdown [1] (exclude the dashed lines):


   1. some text

   2. some code:

  
  My first line of code
  The second one
  Some indented code
  Another line
  

   3. end of the list


Something like `kramdown test.txt > test.html`

Works the way you intend. You'll get paragraphs within the list items
but, arguably, you want them, or eventually will. IIRC, PHP Markdown
Extra [2] handles this similarly.

HTH

LQ


[1]: http://kramdown.rubyforge.org/
[2]: http://michelf.ca/projects/php-markdown/extra/
Thank you for your suggestion. However, I use ikiwiki, and, if I do so, 
it's to avoid using php, ruby or anything else ;)


So, I'll rather patch ikiwiki than install a hanful of packages to solve 
a simple problem ;)


Nevertheless, thank you very much.
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: pre in lists

2012-08-16 Thread Lou Quillio
On Thu, Aug 16, 2012 at 10:26 AM, Boris Le Ninivin
 wrote:
> On 08/16/2012 02:43 PM, Rob McBroom wrote:
>>
>> On Aug 16, 2012, at 5:45 AM, Boris Le Ninivin 
>> wrote:
>>
>>> When I try to use the code block syntax in a list, i.e :
>>>
>>> 1. some text
>>> 2. some code :
>>> My first line of code
>>> The second one
>>> Some indented code
>>> Another line
>>> 3. end of the list
>>>
>>> it doesn't work. Yet it appears that the syntax is valid (I checked on
>>> the w3 validator). I would need that functionality. Would it be possible to
>>> improve the markdown parser by adding it ?
>>
>> Code blocks in list items need to be indented 8 spaces instead of 4, and
>> (for some implementations anyway) there needs to be an empty line before the
>> first line of code. I think that's documented somewhere, but I'm too lazy to
>> check.
>>
> Well, the implementation I user (ikiwiki) doesn't support that, so I use :
>
>
> 1. some text
> 2. some code :
> `My first line of code`
> `The second one`
>>
>> `Some indented code`
>> `Another line`
>
> 3. end of the list
>
> My problem now is that when I want to add a not after the blockquote, either
> it's a the SAME level as the blockquote:
>
>
> 1. some text
> 2. some code :
> `My first line of code`
> `The second one`
>>
>> `Some indented code`
>> `Another line`
>
> (note)
>
> 3. end of the list
>
> or it breaks the list:
>
>
> 1. some text
> 2. some code :
> `My first line of code`
> `The second one`
>>
>> `Some indented code`
>> `Another line`
>
>
> (note)
>
>
> 3. end of the list
>
> Do you have an idea on how to do that ?

Relying on indentation for code blocks will disappoint you endlessly.
Better to use a transformer that supports fenced code blocks. Run this
through kramdown [1] (exclude the dashed lines):


  1. some text

  2. some code:

 
 My first line of code
 The second one
 Some indented code
 Another line
 

  3. end of the list


Something like `kramdown test.txt > test.html`

Works the way you intend. You'll get paragraphs within the list items
but, arguably, you want them, or eventually will. IIRC, PHP Markdown
Extra [2] handles this similarly.

HTH

LQ


[1]: http://kramdown.rubyforge.org/
[2]: http://michelf.ca/projects/php-markdown/extra/


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


Re: pre in lists

2012-08-16 Thread Boris Le Ninivin

On 08/16/2012 02:43 PM, Rob McBroom wrote:

On Aug 16, 2012, at 5:45 AM, Boris Le Ninivin  wrote:


When I try to use the code block syntax in a list, i.e :

1. some text
2. some code :
My first line of code
The second one
Some indented code
Another line
3. end of the list

it doesn't work. Yet it appears that the syntax is valid (I checked on the w3 
validator). I would need that functionality. Would it be possible to improve 
the markdown parser by adding it ?

Code blocks in list items need to be indented 8 spaces instead of 4, and (for 
some implementations anyway) there needs to be an empty line before the first 
line of code. I think that's documented somewhere, but I'm too lazy to check.


Well, the implementation I user (ikiwiki) doesn't support that, so I use :

1. some text
2. some code :
`My first line of code`
`The second one`

`Some indented code`
`Another line`

3. end of the list

My problem now is that when I want to add a not after the blockquote, 
either it's a the SAME level as the blockquote:


1. some text
2. some code :
`My first line of code`
`The second one`

`Some indented code`
`Another line`

(note)
3. end of the list

or it breaks the list:

1. some text
2. some code :
`My first line of code`
`The second one`

`Some indented code`
`Another line`


(note)

3. end of the list

Do you have an idea on how to do that ?

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


Re: pre in lists

2012-08-16 Thread Boris Le Ninivin

On 08/16/2012 02:43 PM, Rob McBroom wrote:

On Aug 16, 2012, at 5:45 AM, Boris Le Ninivin  wrote:


When I try to use the code block syntax in a list, i.e :

1. some text
2. some code :
My first line of code
The second one
Some indented code
Another line
3. end of the list

it doesn't work. Yet it appears that the syntax is valid (I checked on the w3 
validator). I would need that functionality. Would it be possible to improve 
the markdown parser by adding it ?

Code blocks in list items need to be indented 8 spaces instead of 4, and (for 
some implementations anyway) there needs to be an empty line before the first 
line of code. I think that's documented somewhere, but I'm too lazy to check.


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


Re: pre in lists

2012-08-16 Thread Rob McBroom
On Aug 16, 2012, at 5:45 AM, Boris Le Ninivin  wrote:

> When I try to use the code block syntax in a list, i.e :
> 
> 1. some text
> 2. some code :
>My first line of code
>The second one
>Some indented code
>Another line
> 3. end of the list
> 
> it doesn't work. Yet it appears that the syntax is valid (I checked on the w3 
> validator). I would need that functionality. Would it be possible to improve 
> the markdown parser by adding it ?

Code blocks in list items need to be indented 8 spaces instead of 4, and (for 
some implementations anyway) there needs to be an empty line before the first 
line of code. I think that's documented somewhere, but I'm too lazy to check.

-- 
Rob McBroom


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


pre in lists

2012-08-16 Thread Boris Le Ninivin

When I try to use the code block syntax in a list, i.e :

1. some text
2. some code :
My first line of code
The second one
Some indented code
Another line
3. end of the list

it doesn't work. Yet it appears that the syntax is valid (I checked on 
the w3 validator). I would need that functionality. Would it be possible 
to improve the markdown parser by adding it ?


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