aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/develop/po4a_set.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/develop/po4a_set.rb')
-rw-r--r--lib/sisu/develop/po4a_set.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/sisu/develop/po4a_set.rb b/lib/sisu/develop/po4a_set.rb
index 2ae73102..d56175fe 100644
--- a/lib/sisu/develop/po4a_set.rb
+++ b/lib/sisu/develop/po4a_set.rb
@@ -57,7 +57,8 @@
module SiSU_Po4aUtils
class Wrap
def initialize(md,orig='',trans='',is_desc='',n_char_max=76,n_indent=0,n_hang=nil)
- @md,@orig,@trans,@is_desc,@n_char_max,@n_indent=md,orig,trans,is_desc,n_char_max,n_indent
+ @md,@orig,@trans,@is_desc,@n_char_max,@n_indent=
+ md, orig, trans, is_desc, n_char_max, n_indent
@n_char_max_extend = n_char_max
@br="\n"
@n_hang=n_hang ? n_hang : @n_indent
@@ -66,7 +67,8 @@ module SiSU_Po4aUtils
end
def line_wrap
space=' '
- spaces_indent,spaces_hang="#{@br}#{space*@n_indent}",space*@n_hang
+ spaces_indent,spaces_hang=
+ "#{@br}#{space*@n_indent}",space*@n_hang
pot,i=[],0
pot_array=(@trans.empty?) ? [@orig] : [@orig,@trans]
pot_array.each do |pa|
@@ -76,7 +78,7 @@ module SiSU_Po4aUtils
@oldword='' #REMOVE @oldword
pa=pa.gsub(/<br>/,' <br> ').
gsub(/#{Mx[:br_nl]}/,"\n\n")
- words=pa.scan(/\n\n|<br>|\S+/m)
+ words=pa.scan(/\n\n|\\\\\\|<br>|\S+/m)
while words != ''
word=words.shift
if not word