aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2023-11-02 13:54:28 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2023-11-02 13:54:28 -0400
commitc1c85bc114f1d21713394f78e095f71f9b146831 (patch)
treee1772e25533af09579f2834656d284f77e9a0c88 /lib
parentnix, set versions: sisu-7.3.1; ruby-3.1 (diff)
fixes for >= ruby-3.2 (nix ruby set ruby-3.3)
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/ao_misc_arrange.rb5
-rw-r--r--lib/sisu/ao_numbering.rb2
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/sisu/ao_misc_arrange.rb b/lib/sisu/ao_misc_arrange.rb
index 95ddf6a9..be0c18af 100644
--- a/lib/sisu/ao_misc_arrange.rb
+++ b/lib/sisu/ao_misc_arrange.rb
@@ -177,11 +177,12 @@ module SiSU_AO_MiscArrangeText
else
para
end
- para=if para =~/^(?:code(?:\.[a-z][0-9a-z_]+)?|box(?:\.[a-z_]+)?|poem|alt|group|block|table)\{|^\}(?:code|box|poem|alt|group|block|table)/m
+ para=if para.to_s =~/^(?:code(?:\.[a-z][0-9a-z_]+)?|box(?:\.[a-z_]+)?|poem|alt|group|block|table)\{|^\}(?:code|box|poem|alt|group|block|table)/m
curly_braces(para)
else
para
end
+ para.to_s
end
def prepare_text
data=@data
@@ -193,7 +194,7 @@ module SiSU_AO_MiscArrangeText
data[0]=data[0].gsub(/^(SiSU\s*[\d.]*)$/,'% \1').
gsub(/^(sisu-[\d.]+)$/,'% \1')
end
- data.each.map do |para|
+ data=data.each.map do |para|
para=conditional_headings(para)
markup_blocks(para)
end.flatten
diff --git a/lib/sisu/ao_numbering.rb b/lib/sisu/ao_numbering.rb
index 4b48bc39..3956fa4a 100644
--- a/lib/sisu/ao_numbering.rb
+++ b/lib/sisu/ao_numbering.rb
@@ -401,7 +401,7 @@ module SiSU_AO_Numbering
when :extract then Mx[:segname_prefix_auto_num_extract]
else '_'*dob.lv.to_i #should not occur
end
- if possible_seg_name =~/^[0-9]+?\.$/m #!~/[.,:-]+/
+ if possible_seg_name.to_s =~/^[0-9]+?\.$/m #!~/[.,:-]+/
possible_seg_name=possible_seg_name.
gsub(/\.$/,'')
end