aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-04-27 20:37:38 -0400
committerRalph Amissah <ralph@amissah.com>2011-04-27 20:37:38 -0400
commit416d0ec8534623c7dac819d8702ec95d4015975d (patch)
tree36a14cb5a7072a856e35bea04786700546168c37 /lib
parentv2 v3: bin/ type fix for ruby version check (diff)
v2 v3: manpage, reinstate escaping of hyphens
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v2/manpage.rb1
-rw-r--r--lib/sisu/v2/param.rb2
-rw-r--r--lib/sisu/v3/manpage.rb1
-rw-r--r--lib/sisu/v3/param.rb2
4 files changed, 6 insertions, 0 deletions
diff --git a/lib/sisu/v2/manpage.rb b/lib/sisu/v2/manpage.rb
index a040f1a0..f9c75227 100644
--- a/lib/sisu/v2/manpage.rb
+++ b/lib/sisu/v2/manpage.rb
@@ -293,6 +293,7 @@ WOK
dob.obj.gsub!(/┆/,'|')
dob.obj.gsub!(/\s\.(\S+)/,' \\.\1')
dob.obj.gsub!(/(\n\.)(\S\S\S+)/m,'\1\\.\2')
+ dob.obj.gsub!(/-/,'\-') #manpages use this
dob.obj.gsub!(/&#126;/,'~') if dob.obj #manpages use this
if dob.is =~/group|verse|alt|code/
if dob.is =='code'
diff --git a/lib/sisu/v2/param.rb b/lib/sisu/v2/param.rb
index c500c282..656490d9 100644
--- a/lib/sisu/v2/param.rb
+++ b/lib/sisu/v2/param.rb
@@ -733,12 +733,14 @@ module SiSU_Param
end
if manpage['name']
manpage['name']=manpage['name'].join("\n.br\n")
+ manpage['name'].gsub!(/(-)/m,"\\\\\\1")
manpage['name'].gsub!(/\A/,"\n.br\n.SH NAME\n.br\n")
else
manpage['name']='man page "name/whatis" information not provided, set in header @man: name=[whatis information]'
end
if manpage['synopsis']
manpage['synopsis']=manpage['synopsis'].join("\n\n.br\n")
+ manpage['synopsis'].gsub!(/(-)/m,"\\\\\\1")
manpage['synopsis'].gsub!(/\A/,"\n.br\n.SH SYNOPSIS\n.br\n")
else
manpage['synopsis']=''
diff --git a/lib/sisu/v3/manpage.rb b/lib/sisu/v3/manpage.rb
index 362d9cda..17fef80b 100644
--- a/lib/sisu/v3/manpage.rb
+++ b/lib/sisu/v3/manpage.rb
@@ -293,6 +293,7 @@ WOK
dob.obj.gsub!(/┆/,'|')
dob.obj.gsub!(/\s\.(\S+)/,' \\.\1')
dob.obj.gsub!(/(\n\.)(\S\S\S+)/m,'\1\\.\2')
+ dob.obj.gsub!(/-/,'\-') #manpages use this
dob.obj.gsub!(/&#126;/,'~') if dob.obj #manpages use this
if dob.is =~/block|group|verse|alt|code/
if dob.is =='code'
diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb
index c2968564..8aa543db 100644
--- a/lib/sisu/v3/param.rb
+++ b/lib/sisu/v3/param.rb
@@ -744,12 +744,14 @@ module SiSU_Param
end
if manpage['name']
manpage['name']=manpage['name'].join("\n.br\n")
+ manpage['name'].gsub!(/(-)/m,"\\\\\\1")
manpage['name'].gsub!(/\A/,"\n.br\n.SH NAME\n.br\n")
else
manpage['name']='man page "name/whatis" information not provided, set in header @man: name=[whatis information]'
end
if manpage['synopsis']
manpage['synopsis']=manpage['synopsis'].join("\n\n.br\n")
+ manpage['synopsis'].gsub!(/(-)/m,"\\\\\\1")
manpage['synopsis'].gsub!(/\A/,"\n.br\n.SH SYNOPSIS\n.br\n")
else
manpage['synopsis']=''