dznqbit

About

Alaska Grown computer programmer and musician. I live in Seattle.

Contact

cv / resume

Cool Stuff I've Written

blog

pre Tags Inside Haml Without Going Insane

Stuffing some genius code inside <pre> tags?

Use a squiggly HEREDOC .

%h1 It's Ruby!

:ruby
  my_ruby_code = <<~'EOS'
    next_level = [1, 2, 3].map do |i|
      i + 1
    end

    puts next_level.join(" ")
  EOS

%pre= my_ruby_code