Search code examples
rubymaruku

how to write code blocks using maruku


how can i write code blocks in maruku for ruby,javascript

currently i am using technique. but my first line moving to left.

hash["test"] = "test"
hash.merge!("test" => "test")
h=HashWithIndifferentAccess.new
h.update(:test => "test")

{:lang=ruby html_use_syntax=true}


Solution

  • I'm not sure I fully understand the question, but Maruku is just a Markdown interpreter.

    To produce a code block in Markdown, simply indent every line of the block by at least 4 spaces or 1 tab. For example, given this input:

    This is a normal paragraph:
    
        This is a code block.
    

    Markdown will generate:

    <p>This is a normal paragraph:</p>
    
    <pre><code>This is a code block.
    </code></pre>