aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-07-11 00:03:26 -0400
committerRalph Amissah <ralph@amissah.com>2014-07-11 00:03:26 -0400
commitd1c4bb34715672c50a646b11007191ef91fcc287 (patch)
tree1133429c6876dc82588f2fe99fca5da10a41b408 /lib/sisu/v5
parentv5 v6: version & changelog (& rakefile) (diff)
v5 v6: ao_numbering, auto name segment, extract "number" from heading, fix
Diffstat (limited to 'lib/sisu/v5')
-rw-r--r--lib/sisu/v5/ao_numbering.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sisu/v5/ao_numbering.rb b/lib/sisu/v5/ao_numbering.rb
index 278ea514..d213ca4d 100644
--- a/lib/sisu/v5/ao_numbering.rb
+++ b/lib/sisu/v5/ao_numbering.rb
@@ -326,7 +326,7 @@ module SiSU_AO_Numbering
if possible_seg_name =~/^[0-9]+$/m \
and possible_seg_name.to_i <= heading_num_is.to_i
prefix + leading_zeros_fixed_width_number(possible_seg_name)
- elsif possible_seg_name =~/^[\d.,:-]+$/m
+ elsif possible_seg_name =~/^[0-9][\d.,:-]*$/m
possible_seg_name=possible_seg_name.
gsub(/(?:[:,-]|\W)/,'.').
gsub(/\.$/,'')
@@ -369,7 +369,7 @@ module SiSU_AO_Numbering
@md.set_heading_seg=true
end
if dob.name !~/^\S+/ \
- and dob.obj =~/^\s*(?:\S+\s+)?([\d.,:-]+)/m #heading starts with a recognised numeric or word followed by a recognised numeric construct, use that as name
+ and dob.obj =~/^\s*(?:\S+\s+)?([0-9][0-9.,:-]*)/m #heading starts with a recognised numeric or word followed by a recognised numeric construct, use that as name
possible_seg_name=$1
possible_seg_name=
auto_seg_name(possible_seg_name,heading_num_is,:extract)