aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/manpage.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2008-09-05 01:24:49 -0400
committerRalph Amissah <ralph@amissah.com>2008-09-05 01:24:49 -0400
commit9432d0345a982f2c64c684cc913b704cca5660f5 (patch)
tree969e72c8a68a9f01a6ab3c1e05e8d72697ca9fe5 /lib/sisu/v0/manpage.rb
parentdal, bullet footnotes fix (check numbered bullets, should also be ok) (diff)
character given to represent non-break space in internal code (dal, constants and affected downstream code)
Diffstat (limited to 'lib/sisu/v0/manpage.rb')
-rw-r--r--lib/sisu/v0/manpage.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sisu/v0/manpage.rb b/lib/sisu/v0/manpage.rb
index 77d6e408..597099ed 100644
--- a/lib/sisu/v0/manpage.rb
+++ b/lib/sisu/v0/manpage.rb
@@ -144,7 +144,7 @@ module SiSU_manpage
end
wrap=util.line_wrap
if wrap =~ /^\s*[\d*+]+\s+.+?\s*\Z/m
- wrap.gsub!(/(^|&nbsp;|\s|\*)\\\*/,'\1\\\\\*') #man page requires
+ wrap.gsub!(/(^|&nbsp;|#{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
@@ -295,7 +295,7 @@ WOK
para.gsub!(/#{Mx[:gl_o]}#126#{Mx[:gl_c]}/,'~')
para.gsub!(/#{Mx[:gl_o]}#169#{Mx[:gl_c]}/,'©')
end
- para.gsub!(/(^|&nbsp;|\s|\*)\\\*/,'\1\\\\\*') #man page requires
+ para.gsub!(/(^|&nbsp;|#{Mx[:nbsp]}|\s|\*)\\\*/,'\1\\\\\*') #man page requires
para.gsub!(/\s\.(\S+)/,' \\.\1')
para.gsub!(/(\n\.)(\S\S\S+)/m,'\1\\.\2')
para.gsub!(/-/,'\-') #manpages use this
@@ -330,7 +330,7 @@ WOK
para.gsub!(/(^|#{Mx[:gl_c]}|\s)[_\\]((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([.,]?(?:\s|$))/,'\1\2\3')
para.gsub!(/<a href=".+?">(.+?)<\/a>/m,'\1')
para.gsub!(/#{Mx[:mk_o]}name#\S+?#{Mx[:mk_c]}/,'') # remove name links
- para.gsub!(/&nbsp;/,' ') # decide on
+ para.gsub!(/&nbsp;|#{Mx[:nbsp]}/,' ') # decide on
para.gsub!(/(["''])/,"\\\\\\1") # quotation marks need escape
para.gsub!(/(?:^|[^_\\])#{Mx[:lnk_o]}\s*(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}(?:(?:https?|file|ftp):\/\/\S+|image)/,' [ \1 ]') #"[ #{dir.url.images_local}\/\\1 ]")
para.gsub!(/^(?:^|[^_\\])#{Mx[:lnk_o]}\s*\S+?\.(?:png|jpg|gif)\s+.+?"(.*?)"\s*#{Mx[:lnk_c]}\S+/,'[image: "\1"]')