Markdown code highlighting using HAML

I delved into the answer for this from yesterday, and I'm at a standstill why this happens ...

We deliver Markdown content through standard HAML templates (we use the excellent Middleman static site generator for assembly, FYI) and Redcarpet to parse Markdown.

Everything works as expected in terms of Markdown output, with the exception of code blocks:

layout.haml
(only the portion of the file showing the plain =yield. This one %sectionis for 6 spaces in the HAML file):

%section.content.main_content
  = yield

index.html.md
(only the part of the file showing the code code code)

### Header Level 3
Here some code:

    $total-columns  : 12;
    $column-width   : 4em;
    $gutter-width   : 1em;
    $grid-padding   : $gutter-width;

The result, although not what we expect, and something messing around indented. I'm not sure if HAML is the culprit or what exactly causes it:

: http://bit.ly/JvjTYo

DOM Chrome Rools : http://bit.ly/JWprGO

. . GitHub, .

+3
2

Haml . , ~ operator =:

%section.content.main_content
~ yield
+6

, . , .

: ?

, ?:

pre { white-space:pre }

: Markdown Line Breaks ,

0

All Articles