summaryrefslogtreecommitdiff
path: root/lib/Pod/Html.pm
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-05-16 12:52:47 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-05-16 12:52:47 +0000
commit5551e547915ad8250f311210b48a73776abd1650 (patch)
tree6986e2881076e8f2fe62d29db479d775a9a15e19 /lib/Pod/Html.pm
parentd96fb2860dc5b4f6aa03586317224ac3cf3a1114 (diff)
downloadperl-5551e547915ad8250f311210b48a73776abd1650.tar.gz
1. Not hardcoding \x0A and \x0D seems to help EBCDIC, amazing.
2. Doing a s///g instead of tr/// works better for CR-delimited files, like in DJGPP (since <FH> doesn't correctly pull in CR-delimited lines). p4raw-id: //depot/perl@16621
Diffstat (limited to 'lib/Pod/Html.pm')
-rw-r--r--lib/Pod/Html.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Pod/Html.pm b/lib/Pod/Html.pm
index 515ca4ebe9..e8f9ff3fa5 100644
--- a/lib/Pod/Html.pm
+++ b/lib/Pod/Html.pm
@@ -372,14 +372,14 @@ sub pod2html {
# be eol agnostic
for (@poddata) {
- if (/\x0D/) {
- if (/\x0D\x0A/) {
- @poddata = map { s/\x0D\x0A/\n/g;
+ if (/\r/) {
+ if (/\r\n/) {
+ @poddata = map { s/\r\n/\n/g;
/\n\n/ ?
map { "$_\n\n" } split /\n\n/ :
$_ } @poddata;
} else {
- @poddata = map { s/\x0D/\n/g;
+ @poddata = map { s/\r/\n/g;
/\n\n/ ?
map { "$_\n\n" } split /\n\n/ :
$_ } @poddata;