aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--data/doc/sisu/CHANGELOG_v53
-rw-r--r--data/doc/sisu/CHANGELOG_v63
-rw-r--r--lib/sisu/v5/ao_numbering.rb4
-rw-r--r--lib/sisu/v6/ao_numbering.rb4
4 files changed, 10 insertions, 4 deletions
diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5
index 8363130b..7eed7c3d 100644
--- a/data/doc/sisu/CHANGELOG_v5
+++ b/data/doc/sisu/CHANGELOG_v5
@@ -38,6 +38,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.5.0.orig.tar.xz
sisu_5.5.0.orig.tar.xz
sisu_5.5.0-1.dsc
+* ao_numbering,
+ * auto name segment, extract "number" from heading, fix
+
%% 5.4.5.orig.tar.xz (2014-07-07:27/1)
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/sisu_5.4.5
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_5.4.5-1
diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6
index 00ff460b..98358c7e 100644
--- a/data/doc/sisu/CHANGELOG_v6
+++ b/data/doc/sisu/CHANGELOG_v6
@@ -28,6 +28,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.1.0.orig.tar.xz
sisu_6.1.0.orig.tar.xz
sisu_6.1.0-1.dsc
+* ao_numbering,
+ * auto name segment, extract "number" from heading, fix
+
%% 6.0.11.orig.tar.xz (2014-07-07:27/1)
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/sisu_6.0.11
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_6.0.11-1
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)
diff --git a/lib/sisu/v6/ao_numbering.rb b/lib/sisu/v6/ao_numbering.rb
index ffafbf9c..ef85bbd6 100644
--- a/lib/sisu/v6/ao_numbering.rb
+++ b/lib/sisu/v6/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)