summaryrefslogtreecommitdiff
path: root/pod/pod2man.PL
diff options
context:
space:
mode:
authorDavin Milun <milun@cs.Buffalo.EDU>1997-05-26 00:54:04 +1200
committerTim Bunce <Tim.Bunce@ig.co.uk>1997-06-11 12:00:00 +1200
commit3ad491548632328bb8df33165fefb8d5b9b7b7a9 (patch)
treea773411deed4a5251d226b6872586049d379dafd /pod/pod2man.PL
parent9edb2b4665db2ce663d9133a47065be4582a8114 (diff)
downloadperl-3ad491548632328bb8df33165fefb8d5b9b7b7a9.tar.gz
pod2man produces broken pages
Georg Moritz <gm@mgm-net.de> wrote: >A single quote in a pod file beginning a line, translated to \*(L' >by B<pod2man> lets the formatter choke, i.e. the line is (in the best >case) treated as a comment. I think it would be better to leave the pods alone, and fix pod2man: p5p-msgid: 1997May25.192350.2055977@hmivax.humgen.upenn.edu private-msgid: 199705310447.AAA15721@obelix.cs.Buffalo.EDU Signed-off-by: Hans Mulder <hansm@icgned.nl>
Diffstat (limited to 'pod/pod2man.PL')
-rw-r--r--pod/pod2man.PL3
1 files changed, 3 insertions, 0 deletions
diff --git a/pod/pod2man.PL b/pod/pod2man.PL
index cd14ce2866..b0f8b1b36a 100644
--- a/pod/pod2man.PL
+++ b/pod/pod2man.PL
@@ -705,6 +705,9 @@ while (<>) {
# trofficate backslashes; must do it before what happens below
s/\\/noremap('\\e')/ge;
+ # protect leading periods and quotes against *roff
+ # mistaking them for directives
+ s/^(?:[A-Z]<)?[.']/\\&$&/gm;
# first hide the escapes in case we need to
# intuit something and get it wrong due to fmting