What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

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
share|improve this question

marked as duplicate by Jeff Atwood Nov 12 '09 at 13:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
see the duplicate answer, and try the babelmark. –  Jeff Atwood Nov 12 '09 at 13:52
    
go here and test babelmark.bobtfish.net –  Jeff Atwood 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 Answer 1

up vote 1 down vote accepted

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>
share|improve this answer
    
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. –  Ladybug Killer Nov 13 '09 at 15:20

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