aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4/dal_doc_str.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-05-29 19:36:42 -0400
committerRalph Amissah <ralph@amissah.com>2013-05-29 19:36:42 -0400
commit25e9f4f2a37608f9704645f92a50615a01a50db5 (patch)
treed7426bc7169b6a19d476bf1ce985b4a2075ec78d /lib/sisu/v4/dal_doc_str.rb
parentv4 v5: help, interactive help, out of date, removed (diff)
v4 v5: document version check, disable
* automatic check disabled * check and correction of pre 0.38 markup removed
Diffstat (limited to 'lib/sisu/v4/dal_doc_str.rb')
-rw-r--r--lib/sisu/v4/dal_doc_str.rb48
1 files changed, 0 insertions, 48 deletions
diff --git a/lib/sisu/v4/dal_doc_str.rb b/lib/sisu/v4/dal_doc_str.rb
index dfea4ad4..25c6f854 100644
--- a/lib/sisu/v4/dal_doc_str.rb
+++ b/lib/sisu/v4/dal_doc_str.rb
@@ -556,7 +556,6 @@ module SiSU_DAL_DocumentStructureExtract
@md,@dob=md,dob
end
def structure
- structure_markup_normalize
structure_markup
@dob
end
@@ -590,53 +589,6 @@ module SiSU_DAL_DocumentStructureExtract
end
@dob
end
- def structure_markup_normalize #needs a bit of thinking
- dob=if @md.markup_version.determined < 0.38 #%convert internal representation, consider making 0.38 structure default ([A-C1-6] instead of [1-9]), requires downstream changes
- @dob=@dob.gsub(/^[456]~/,'!_').
- gsub(/^3~(\S+)/,"#{Mx[:lv_o]}6:\\1#{Mx[:lv_c]}").
- gsub(/^3~\s+/,"#{Mx[:lv_o]}6:#{Mx[:lv_c]}").
- gsub(/^2~(\S+)/,"#{Mx[:lv_o]}5:\\1#{Mx[:lv_c]}").
- gsub(/^2~\s+/,"#{Mx[:lv_o]}5:#{Mx[:lv_c]}").
- gsub(/^1~(\S+)/,"#{Mx[:lv_o]}4:\\1#{Mx[:lv_c]}").
- gsub(/^1~\s+/,"#{Mx[:lv_o]}4:#{Mx[:lv_c]}").
- gsub(/^:?C~(\S+)/,"#{Mx[:lv_o]}3:\\1#{Mx[:lv_c]}").
- gsub(/^:?C~\s+/,"#{Mx[:lv_o]}3:#{Mx[:lv_c]}").
- gsub(/^:?B~(\S+)/,"#{Mx[:lv_o]}2:\\1#{Mx[:lv_c]}").
- gsub(/^:?B~\s+/,"#{Mx[:lv_o]}2:#{Mx[:lv_c]}").
- gsub(/^:?A~(\S+)/,"#{Mx[:lv_o]}1:\\1#{Mx[:lv_c]}").
- gsub(/^:?A~\s+/,"#{Mx[:lv_o]}1:#{Mx[:lv_c]}")
- @dob=if @dob =~/^@(?:level|markup):\s/
- @dob=@dob.gsub(/3/,'6').
- gsub(/2/,'5').
- gsub(/1/,'4').
- gsub(/:?C/,'3').
- gsub(/:?B/,'2').
- gsub(/:?A/,'1')
- @dob
- else @dob
- end
- else @dob
- end
- end
- def structure_marks
- t_o=if @md.markup_version.determined < 0.38
- @t_o=@t_o.gsub(/^1~(\S+)/,"#{Mx[:lv_o]}1:\\1#{Mx[:lv_c]}").
- gsub(/^1~\s+/,"#{Mx[:lv_o]}1:#{Mx[:lv_c]}").
- gsub(/^2~(\S+)/,"#{Mx[:lv_o]}2:\\1#{Mx[:lv_c]}").
- gsub(/^2~\s+/,"#{Mx[:lv_o]}2:#{Mx[:lv_c]}").
- gsub(/^3~(\S+)/,"#{Mx[:lv_o]}3:\\1#{Mx[:lv_c]}").
- gsub(/^3~\s+/,"#{Mx[:lv_o]}3:#{Mx[:lv_c]}").
- gsub(/^4~(\S+)/,"#{Mx[:lv_o]}4:\\1#{Mx[:lv_c]}").
- gsub(/^4~\s+/,"#{Mx[:lv_o]}4:#{Mx[:lv_c]}").
- gsub(/^5~(\S+)/,"#{Mx[:lv_o]}5:\\1#{Mx[:lv_c]}").
- gsub(/^5~\s+/,"#{Mx[:lv_o]}5:#{Mx[:lv_c]}").
- gsub(/^6~(\S+)/,"#{Mx[:lv_o]}6:\\1#{Mx[:lv_c]}").
- gsub(/^6~\s+/,"#{Mx[:lv_o]}6:#{Mx[:lv_c]}").
- gsub(/^[789]~/,'!_')
- @t_o
- else @t_o
- end
- end
end
class OCN
def initialize(md,data)