Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Pod-Simple CPAN distribution.

Report information
The Basics
Id: 103389
Status: rejected
Priority: 0/
Queue: Pod-Simple

People
Owner: Nobody in particular
Requestors: oleg [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 3.10



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.
Subject: Re: [rt.cpan.org #103389] Automatically remove prepending whitespaces for multiline code blocks
Date: Wed, 8 Apr 2015 12:47:36 -0700
To: bug-Pod-Simple [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
On Apr 8, 2015, at 11:34 AM, Oleg G via RT <bug-Pod-Simple@rt.cpan.org> wrote: Show quoted text
> 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.
That’s what strip_verbatim_indent() is for. https://metacpan.org/pod/distribution/Pod-Simple/lib/Pod/Simple.pod#parser-strip_verbatim_indent-SOMEVALUE Best, David