about summary refs log tree commit diff
path: root/buildtools
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2021-04-23 02:32:59 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2021-04-23 02:32:59 +0000
commit8fd83a19a0288e5be5fb01fcda0d531d281b05fd (patch)
tree293251923272e7c00e00b0ae56e87b6c605671ce /buildtools
parent81e404b06e632b46f6ce8e9838ec5459be54dac6 (diff)
downloadnetpbm-mirror-8fd83a19a0288e5be5fb01fcda0d531d281b05fd.tar.gz
netpbm-mirror-8fd83a19a0288e5be5fb01fcda0d531d281b05fd.tar.xz
netpbm-mirror-8fd83a19a0288e5be5fb01fcda0d531d281b05fd.zip
handle sub, pre end tag not on line by itself
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4093 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'buildtools')
-rwxr-xr-xbuildtools/makeman5
1 files changed, 4 insertions, 1 deletions
diff --git a/buildtools/makeman b/buildtools/makeman
index b954a5d6..920c200c 100755
--- a/buildtools/makeman
+++ b/buildtools/makeman
@@ -117,7 +117,7 @@ def makeman(name, file, indoc):
     indoc = ('.TH "%s" %d "%s" "%s"\n' % (title,section,date,source)) + indoc
     # Literal layout
     indoc = re.sub("(?i)\n *<PRE>", "\n.nf", indoc)
-    indoc = re.sub("(?i)\n *</PRE>", "\n.fi", indoc)
+    indoc = re.sub("(?i) *</PRE>\n", "\n.fi\n", indoc)
     indoc = re.sub("(?i)\n *<BLOCKQUOTE>", "\n.RS", indoc)
     indoc = re.sub("(?i)\n *</BLOCKQUOTE>", "\n.RE", indoc)
     # Highlight processing
@@ -232,6 +232,9 @@ def makeman(name, file, indoc):
     # Abbreviation - just erase tags
     indoc = re.sub('<abbr [^>]+>', '', indoc)
     indoc = re.sub('</abbr>', '', indoc)
+    # Subscript - just erase tags
+    indoc = re.sub('(?i)<sub [^>]+>', '', indoc)
+    indoc = re.sub('(?i)</sub>', '', indoc)
     # Span - just erase tags
     indoc = re.sub('(?i)<span [^>]+>', '', indoc)
     indoc = re.sub('(?i)</span>', '', indoc)