0

Possible Duplicate:
Bug in Markdown formatter

If you have a whiteline inside a code block, which is inside a list, it gets doubled. It doesn't matter whether you put eight spaces in that whiteline (allegedly to force it to be code).

If the following example does not contain two blank lines, the bug has been solved:

  • Item 1

    helloWorld();  // see ma? Say hello to one whiteline:
    
    helloOtherWorld();
    
  • Item X

The code of the above snippet has only one whiteline:

* Item 1

        helloWorld();  // see ma? Say hello to one whiteline:

        helloOtherWorld();
* Item X

I haven't found any workaround yet. Anybody an idea to keep formatting and prevent double whitelines? Any sight on fixing this bug?


Workaround

EDIT: unfortunately, this question was closed, otherwise I'd added this workaround as an answer to the question

If you use <code><pre><code> (yes, two times <code>) instead of eight spaces, and replace the whiteline with a single &nbsp;. The double whiteline is gone and the final rendering is even better then the default rendering with eight spaces.

  • Workaround item 1
    helloWorld();  // see ma? Say hello to REALLY one whiteline:
     
    helloOtherWorld();
  • Item X
  • Item Y

To achieve this effect, use MarkDown+HTML code as follows:

* Workaround item 1
<code><pre><code>helloWorld();  // see ma? Say hello to REALLY one whiteline:
 
helloOtherWorld();</code></pre></code>
* Item X
4
  • see the duplicate answer, and try the babelmark. Nov 12 '09 at 13:52
  • go here and test babelmark.bobtfish.net Nov 12 '09 at 13:52
  • I know the babelmark, Jeff, but a bug in babelmark does not mean it is not a bug. In this case: each implementation gives a different output on the link you gave: sometimes one, sometimes two whitelines.
    – Abel
    Nov 13 '09 at 14:49
  • Just thinking out-loud: isn't this a simple \r\n conversion issue, where CRLF becomes LFLF, but should've become LF?
    – Abel
    Nov 13 '09 at 14:50
1

FTFY:

  • Item 1
  •     helloWorld();  // see ma? Say hello to one whiteline:  
    
        helloOtherWorld();
    

  • Item X


The code:

 <ul>

<li>Item 1</li>

        helloWorld();  // see ma? Say hello to one whiteline:  

        helloOtherWorld();

<li>Item X</li>

</ul>
2
  • Glad you found some kind of work-around, that helps for the time being until this is fixed :). This inspired me to look further, see my edit (can't add more answers since this q. was closed)
    – Abel
    Nov 13 '09 at 15:14
  • It has to with indentation. There is a blank before <ul>. It does not work without it. Nov 13 '09 at 15:20

Not the answer you're looking for? Browse other questions tagged .