This repository has been archived by the owner. It is now read-only.
No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
views
.gitignore
Gemfile
Gemfile.lock
Procfile
config.ru
readme.md

readme.md

Haml and Markdown

You must write like following in a haml file;

...
  %body
    ...
    ~ markdown(:index, layout: false, fenced_code_blocks: true)
    ...

If you write = markdown(...) instead of ~ markdown(...), the generated HTML file will be

...
  <body>
    ...
    <pre><code>cd
    ls
    </code></pre>
    ...
  </body>
...

then, the output will be like following;

cd
    ls

"~" makes your code block in the markdown file to be converted with "&#x000A;". "&#x000A;" is "\n".

Sample

http://ka-haml-md.herokuapp.com

References