summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChip Salzenberg <chip@pobox.com>1999-04-13 04:25:10 +0000
committerchip <chip@pobox.com>1999-04-13 04:25:10 +0000
commit3f3804d23a0a6dc4c9e35ee3a453281954e7033a (patch)
tree58fb1223f7790c822e1ed1b3e7b72a80b84da6b0
parent3d84e8d6e97634ad0fcc3fa639d32660a0f4ffb0 (diff)
downloadperl-3f3804d23a0a6dc4c9e35ee3a453281954e7033a.tar.gz
Use locale in Pod::Html and Pod::Text.
Fix typos in Pod::Text. p4raw-id: //depot/maint-5.004/perl@3242
-rw-r--r--lib/Pod/Html.pm4
-rw-r--r--lib/Pod/Text.pm12
2 files changed, 10 insertions, 6 deletions
diff --git a/lib/Pod/Html.pm b/lib/Pod/Html.pm
index 3994f5dc80..fc9d16a14d 100644
--- a/lib/Pod/Html.pm
+++ b/lib/Pod/Html.pm
@@ -4,13 +4,15 @@ use Pod::Functions;
use Getopt::Long; # package for handling command-line parameters
require Exporter;
use vars qw($VERSION);
-$VERSION = 1.01;
+$VERSION = '1.0101';
@ISA = Exporter;
@EXPORT = qw(pod2html htmlify);
use Cwd;
use Carp;
+use locale; # make \w work right in non-ASCII lands
+
use strict;
use Config;
diff --git a/lib/Pod/Text.pm b/lib/Pod/Text.pm
index 67993db3f5..3988d46048 100644
--- a/lib/Pod/Text.pm
+++ b/lib/Pod/Text.pm
@@ -50,7 +50,9 @@ require Exporter;
@EXPORT = qw(pod2text);
use vars qw($VERSION);
-$VERSION = "1.0203";
+$VERSION = "1.0204";
+
+use locale; # make \w work right in non-ASCII lands
$termcap=0;
@@ -272,15 +274,15 @@ sub prepare_for_output {
if (length() + 3 < $indent) {
my $paratag = $_;
$_ = <IN>;
- if (/^=/) { # tricked!
- local($indent) = $indent[$#index - 1] || $DEF_INDENT;
+ if (/^[=\s]/) { # tricked!, or verbatim paragraph
+ local($indent) = $indent[$#indent - 1] || $DEF_INDENT;
output($paratag);
redo POD_DIRECTIVE;
}
&prepare_for_output;
IP_output($paratag, $_);
} else {
- local($indent) = $indent[$#index - 1] || $DEF_INDENT;
+ local($indent) = $indent[$#indent - 1] || $DEF_INDENT;
output($_, 0);
}
}
@@ -368,7 +370,7 @@ sub fill {
sub IP_output {
local($tag, $_) = @_;
- local($tag_indent) = $indent[$#index - 1] || $DEF_INDENT;
+ local($tag_indent) = $indent[$#indent - 1] || $DEF_INDENT;
$tag_cols = $SCREEN - $tag_indent;
$cols = $SCREEN - $indent;
$tag =~ s/\s*$//;