diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-03-05 14:57:52 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-03-05 14:57:54 -0500 |
commit | a512dfecf8f9594f34fa766de9941a3dcc69d4b3 (patch) | |
tree | a791b0ce0c3977475b1ebafcbb3f4bd11d47a4d6 | |
parent | v2, v3: defaults, default homepage tidy & update links (diff) |
v2, v3: manpage, adjust output (backslash ('\') escapes reduced)
-rw-r--r-- | lib/sisu/v2/manpage.rb | 5 | ||||
-rw-r--r-- | lib/sisu/v3/manpage.rb | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/lib/sisu/v2/manpage.rb b/lib/sisu/v2/manpage.rb index 2d13793b..18670e2a 100644 --- a/lib/sisu/v2/manpage.rb +++ b/lib/sisu/v2/manpage.rb @@ -7,7 +7,7 @@ * Author: Ralph Amissah - * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved. + * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved. * License: GPL 3 or later: @@ -139,7 +139,6 @@ module SiSU_Manpage if wrap =~ /^\s*[\d*+]+\s+.+?\s*\Z/m wrap.gsub!(/(^| |#{Mx[:nbsp]}|\s|\*)\\\*/,'\1\\\\\*') #man page requires wrap.gsub!(/\s\.(\S+)/,' \\.\1') - wrap.gsub!(/(["''])/,"\\\\\\1") # quotation marks need escape wrap.gsub!(/^\s*([\d*+]+)\s+(.+?)\s*\Z/m, <<GSUB .TP .BI \\1. @@ -301,9 +300,9 @@ WOK dob.obj.gsub!(/(?:#{Mx[:br_line]}|#{Mx[:br_nl]})+\s*/,"\n") # watch end dob.obj.gsub!(/(^| |#{Mx[:nbsp]}|\s|\*)\\\*/,'\1\\\\\*') #man page requires + 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!(/~/,'~') if dob.obj #manpages use this if dob.is =~/group|verse|alt|code/ if dob.is =='code' diff --git a/lib/sisu/v3/manpage.rb b/lib/sisu/v3/manpage.rb index 3810a969..e4cb6906 100644 --- a/lib/sisu/v3/manpage.rb +++ b/lib/sisu/v3/manpage.rb @@ -138,7 +138,6 @@ module SiSU_Manpage if wrap =~ /^\s*[\d*+]+\s+.+?\s*\Z/m wrap.gsub!(/(^| |#{Mx[:nbsp]}|\s|\*)\\\*/,'\1\\\\\*') #man page requires wrap.gsub!(/\s\.(\S+)/,' \\.\1') - wrap.gsub!(/(["''])/,"\\\\\\1") # quotation marks need escape wrap.gsub!(/^\s*([\d*+]+)\s+(.+?)\s*\Z/m, <<GSUB .TP .BI \\1. @@ -300,9 +299,9 @@ WOK dob.obj.gsub!(/(?:#{Mx[:br_line]}|#{Mx[:br_nl]})+\s*/,"\n") # watch end dob.obj.gsub!(/(^| |#{Mx[:nbsp]}|\s|\*)\\\*/,'\1\\\\\*') #man page requires + 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!(/~/,'~') if dob.obj #manpages use this if dob.is =~/block|group|verse|alt|code/ if dob.is =='code' |