aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/shared_txt.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/shared_txt.rb')
-rw-r--r--lib/sisu/v3/shared_txt.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/sisu/v3/shared_txt.rb b/lib/sisu/v3/shared_txt.rb
index fbb8e1ac..4afddc05 100644
--- a/lib/sisu/v3/shared_txt.rb
+++ b/lib/sisu/v3/shared_txt.rb
@@ -56,7 +56,7 @@
** Description: modules shared by flatfile output generators
=end
-module SiSU_text_utils
+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
@@ -70,8 +70,8 @@ module SiSU_text_utils
line=0
out=[]
out[line]=''
- @para.gsub!(/<br>/,' <br> ')
- @para.gsub!(/#{Mx[:br_nl]}/,"\n\n")
+ @para=@para.gsub(/<br>/,' <br> ').
+ gsub(/#{Mx[:br_nl]}/,"\n\n")
words=@para.scan(/\n\n|<br>|\S+/m)
while words != ''
word=words.shift
@@ -118,13 +118,13 @@ module SiSU_text_utils
if @para.class==Array
@arr=[]
@para.each do |line|
- @arr << SiSU_text_utils::Wrap.new(line,@n_char_max,@n_indent,@n_hang).line_wrap
+ @arr << SiSU_TextUtils::Wrap.new(line,@n_char_max,@n_indent,@n_hang).line_wrap
end
end
@arr
end
end
- class Header_scan
+ class HeaderScan
def initialize(md,para)
@md,@p=md,para
end