Maruku wrong parsing the second line of code blocks?

I use Maruku (Ruby) to parse some Markdown formatted text. I had a problem formatting a block codelike:

This is a normal line
# pretend this line is empty
    printf("First line of code is OK");
    printf("Second line of code (or any line thereafter) appears indented by an extra level, which is incorrect!");

So, my first line of code (which I put 4 spaces (or a tab) in my md file) displays as I expected. However, the second line of code (indented with exactly the same number of spaces) ends up with an extra 4 space when creating HTML.

The result is as follows:

This is a normal line
<pre><code>printf("First line of code is OK");
      printf("Second line of code (or any line thereafter) appears indented by an extra level, which is incorrect!");</code></pre>

I tested my Markdown input with Gruber "Dingus" and it displays as I expected (that is, both lines of code in one block, both indented at the same level). But with Maruku it surged.

RDiscount, . Maruku, .

SO :

printf("First line of code is OK\n");
printf("Second line of code (or any line thereafter) appears indented by an extra level, which is incorrect!");
+3
1

, , HAML.

HAML , . = preserve @my_html_string.

, layout.haml:

!!! 5
%html
    %body
        = yield

index.haml

%article
    = preserve @my_html_fragment_with_pre_and_code

.

+7

All Articles