in reply to Escape newlines in POD / (Selectively) don't generate space characters instead
Is there any way to actually escape newlines such that perlpod does not generate space characters instead? I've tried playing around with the usual methods, but so far couldn't find any.And then, there was a bit of epiphany.
One possibility that I did overlook is using Z<> to escape newlines. That's actually bending the rules, since perlpodspec states (emphasis mine):
This code is unusual in that it should have no content. That is, a processor may complain if it sees Z<potatoes>. Whether or not it complains, the potatoes text should ignored [sic].And indeed, it does complain. At least podchecker and pod2man do. pod2html, on the other hand, does not. But even though the first two mention syntax errors, the document still seems to be parsed and rendered correctly.
Applying this to my first example:
Refer to the L<foobar section in the Module::Really::Really::Really::Very::Very::Long documentation|Z< >Module::Really::Really::Really::Very::Very::Long/foobar>.
Applying it to the second example is a bit more difficult:
Without the added space right before the starting part of Z<, continues. and This would be concatenated together directly.This is a sentence. It's ending here, but the paragraph continues. Z< >This is another sentence.
Just to be clear: I consider this to be a crappy workaround rather than a real solution. A "real" solution would be adding whitespace escape capabilities to perlpodspec and the numerous POD parsers, which I should probably at least kick off via a bug report.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Escape newlines in POD / (Selectively) don't generate space characters instead (Z<< >>)
by kcott (Archbishop) on Nov 09, 2020 at 06:07 UTC | |
by Ionic (Acolyte) on Nov 09, 2020 at 07:00 UTC | |
by Anonymous Monk on Nov 11, 2020 at 03:22 UTC |