From e0c38cb8d044e0b3dc449e10d1aa14ef3b6900ad Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 19 Jun 2014 21:13:06 -0400 Subject: v6: docbook, ocn & footnote numbers (as xml comments) --- lib/sisu/v6/txt_shared.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/sisu/v6/txt_shared.rb') diff --git a/lib/sisu/v6/txt_shared.rb b/lib/sisu/v6/txt_shared.rb index 8d2a09b7..3159844f 100644 --- a/lib/sisu/v6/txt_shared.rb +++ b/lib/sisu/v6/txt_shared.rb @@ -62,8 +62,8 @@ =end module SiSU_TextUtils class Wrap - def initialize(para='',n_char_max=76,n_indent=0,n_hang=nil) - @para,@n_char_max,@n_indent=para,n_char_max,n_indent + def initialize(para='',n_char_max=76,n_indent=0,n_hang=nil,post='') + @para,@n_char_max,@n_indent,@post,=para,n_char_max,n_indent,post @n_char_max_extend = n_char_max @n_hang=n_hang ? n_hang : @n_indent end @@ -110,7 +110,10 @@ module SiSU_TextUtils end @oldword=word if word =~/\S+/ end - spaces_hang + out.join(spaces_indent) + post=(@post.empty?) \ + ? '' + : "\n" + (' '*@n_indent) +@post + spaces_hang + out.join(spaces_indent) + post end def line_wrap_indent1 @n_indent,@n_hang=2,2 -- cgit v1.2.3