Re: Code block justification
Posted by
marc0der on
Sep 08, 2019; 8:01pm
URL: https://discuss.asciidoctor.org/Code-block-justification-tp7141p7143.html
H Alexander,
Thanks for pointing me to the indent attribute, this is exactly what I needed.
I did experience one quirk though, so I thought I'd share it here for anybody else who might get stuck with this issue:
I set my source at a global level, so setting my indent attribute at the include level as you have didn't work for me.
I ended up having to pass the indent attribute into the include directive. So, using your example it would be:
.Some title
----
include::file.rb[tags=init,indent=0]
----
This ended up working perfectly for me.
Thanks!
Marco.