Subject: | Automatically remove prepending whitespaces for multiline code blocks |
For example I have this POD:
=pod
=head1 EXAMPLE
for (1..10) {
say
}
=cut
where code block created with one tab (\t). Currently Pod::Simple leaves code blocks as is without removing prepending whitespaces (one \t on each line in our example). As the result this produces not very beatiful output at least for html/xhtml.
You can see this page as example: http://rec.data-flow.ru/articles/2015/3/circular-references-memory-leaks-and-mojo.html . As you see each code block has very long indent while it shouldn't.
As the result many people tries to fix this on their side. Metacpan removes this indent with javascript, Mojolicious with additional output parsing: https://metacpan.org/source/SRI/Mojolicious-6.07/lib/Mojolicious/Plugin/PODRenderer.pm#L49
I think it will be good to remove this prepending whitespaces automatically.