aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/ao_doc_str.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-09-05 23:20:13 -0400
committerRalph Amissah <ralph@amissah.com>2014-09-05 23:21:09 -0400
commit98066f7dbc056c75b808b49f8406b7ac21118111 (patch)
treed71c95e7a6c9862377f38955da0fce23e75c896d /lib/sisu/v5/ao_doc_str.rb
parentv5 v6: ao_numbering, provide more information on duplicate numbering before stop (diff)
v5 v6: ao_doc_str, if faulty document structure, stop; if --no-stop option, skipsisu_5.6.5
Diffstat (limited to 'lib/sisu/v5/ao_doc_str.rb')
-rw-r--r--lib/sisu/v5/ao_doc_str.rb32
1 files changed, 25 insertions, 7 deletions
diff --git a/lib/sisu/v5/ao_doc_str.rb b/lib/sisu/v5/ao_doc_str.rb
index e10cc4ef..49c9bdf1 100644
--- a/lib/sisu/v5/ao_doc_str.rb
+++ b/lib/sisu/v5/ao_doc_str.rb
@@ -1308,7 +1308,10 @@ module SiSU_AO_DocumentStructureExtract
STDERR.puts %{current level: #{structure_info.lv[node_ln]} (possible parent levels: #{structure_info.possible_parents(structure_info.lv[node_ln])})
parent level: #{structure_info.lv[node_parent_ln]} (possible child levels: #{structure_info.possible_children(structure_info.lv[node_parent_ln])})
SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"}
- $process_document = :skip
+ if @md.opt.act[:no_stop][:set]==:on
+ $process_document = :skip
+ else exit
+ end
end
end
end
@@ -1327,7 +1330,10 @@ has incorrect level and/or parent level
@title:
SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"
}
- $process_document = :skip
+ if @md.opt.act[:no_stop][:set]==:on
+ $process_document = :skip
+ else exit
+ end
end
unless (defined? @md.creator.author \
and @md.creator.author)
@@ -1337,7 +1343,10 @@ SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"
:author: anonymous?
SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"
}
- $process_document = :skip
+ if @md.opt.act[:no_stop][:set]==:on
+ $process_document = :skip
+ else exit
+ end
end
end
def ocn #and auto segment numbering increment
@@ -1672,8 +1681,11 @@ or this level should be 6~ rather #{dob.lv}"
STDERR.puts %{Substantive text objects must follow a level 1~ 2~ or 3~ heading: #{lev}~
SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"}
puts dob.obj.gsub(/^(.{1,80})/,'"\1"')
- $process_document = :skip
- break
+ if @md.opt.act[:no_stop][:set]==:on
+ $process_document = :skip
+ break
+ else exit
+ end
end
if not dob.obj =~/~#|-#/
ocn_flag=true
@@ -1751,13 +1763,19 @@ SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"}
STDERR.puts %{The number of level A~ in this document: #{@lev_occurences[:a]}
There must be one level A~ (no more and no less)
SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"}
- $process_document = :skip
+ if @md.opt.act[:no_stop][:set]==:on
+ $process_document = :skip
+ else exit
+ end
end
unless @lev_occurences[:l1] > 0
STDERR.puts %{The number of level 1~ in this document: #{@lev_occurences[:l1]}
There must be at least one level 1~ (and as many as required)
SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"}
- $process_document = :skip
+ if @md.opt.act[:no_stop][:set]==:on
+ $process_document = :skip
+ else exit
+ end
end
@o_array
end