Closed thinkerbot closed 13 years ago
For example:
[recipe/example.rb] target.puts "# outdent" indent do target.puts "# indent" heredoc do target.puts 'abc' target.puts 'xyz' end end target.puts "# outdent"
Produces:
# outdent # indent << HEREDOC_0 abc xyz HEREDOC_0 # outdent
To solve this, perhaps add magic comments to turn on/off indent, a-la
<< HEREDOC_0 # :indent-off: abc xyz HEREDOC_0 # :indent-on:
Then strip out these processing instructions within indent if capture depth is 0 (ie right before the indent is written to the true output).
Indent logic is now in linebook. Closed by pinnacol/linebook@23fccaed9fb5bfa39c9400b6a940b184b8f6bb70
For example:
Produces:
To solve this, perhaps add magic comments to turn on/off indent, a-la
Then strip out these processing instructions within indent if capture depth is 0 (ie right before the indent is written to the true output).