From f408992e0acf1a962478886fd968dd71f47b115e Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 12 May 2014 23:03:31 -0400 Subject: v6: ao, document markup structure check, skip processing file on major error * with error message & text at location of failure --- lib/sisu/v5/param.rb | 6 +- lib/sisu/v6/ao_doc_str.rb | 88 ++++++++++++++++-- lib/sisu/v6/composite.rb | 6 +- lib/sisu/v6/hub.rb | 226 +++++++++++++++++++++++++--------------------- lib/sisu/v6/param.rb | 9 +- 5 files changed, 217 insertions(+), 118 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v5/param.rb b/lib/sisu/v5/param.rb index 1167d5ee..adc9350f 100644 --- a/lib/sisu/v5/param.rb +++ b/lib/sisu/v5/param.rb @@ -1311,7 +1311,7 @@ module SiSU_Param if @en[:note] > 0 \ and @en[:sum] > 0 if @en[:sum] > 0 - else SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'*WARN* both endnote styles used',"~{ #{@en[:sum]} }~ and ^~ #{@en[:mark]}").warn unless @opt.act[:unless][:set]==:on + else SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'*WARN* both endnote styles used',"~{ #{@en[:sum]} }~ and ^~ #{@en[:mark]}").warn unless @opt.act[:quiet][:set]==:on end end if @en[:mark] != @en[:note] \ @@ -1328,7 +1328,7 @@ module SiSU_Param and @opt.inspect =~/P/ #@title=Md.new('Text Insert',@opt,@env).title else - SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Title missing','please provide @title:').warn unless @opt.act[:unless][:set]==:on + SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Title missing','please provide @title:').warn unless @opt.act[:quiet][:set]==:on end end if @author !~/[\S]/ @@ -1336,7 +1336,7 @@ module SiSU_Param and @opt.inspect =~/P/ #@creator=SiSU_Param::Md.new('Text Insert',@opt,@env).creator else - SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Author missing','please provide @creator: :author:').warn unless @opt.act[:unless][:set]==:on + SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Author missing','please provide @creator: :author:').warn unless @opt.act[:quiet][:set]==:on end end @struct={} diff --git a/lib/sisu/v6/ao_doc_str.rb b/lib/sisu/v6/ao_doc_str.rb index d8c012fd..3eb4a804 100644 --- a/lib/sisu/v6/ao_doc_str.rb +++ b/lib/sisu/v6/ao_doc_str.rb @@ -847,18 +847,43 @@ module SiSU_AO_DocumentStructureExtract if status==:error node_ln=/^([0-6])/.match(node)[1].to_i node_parent_ln=/^([0-6])/.match(node_parent)[1].to_i - puts %{current level: #{structure_info.lv[node_ln]} (possible parent levels: #{structure_info.possible_parents(structure_info.lv[node_ln])}) + 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 end end end def warning_incorrect_parent_level_or_level(txt) - puts %{warning, -#{txt} -has incorrect level and/or parent level} + puts %{ERROR. There is an error in markup of heading levels either here or in the parent heading. +The current header reads: +"#{txt}" +has incorrect level and/or parent level +--} + end + def required_headers_present? + unless (defined? @md.title \ + and @md.title.full) + STDERR.puts %{required header missing: + +@title: +SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}" +} + $process_document = :skip + end + unless (defined? @md.creator.author \ + and @md.creator.author) + STDERR.puts %{required header missing: + +@creator: + :author: anonymous? +SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}" +} + $process_document = :skip + end end def ocn #and auto segment numbering increment + required_headers_present? data=@data @o_array=[] node=ocn=ocn_dv=ocn_sp=ocnh=ocnh0=ocnh1=ocnh2=ocnh3=ocnh4=ocnh5=ocnh6=ocno=ocnp=ocnt=ocnc=ocng=ocni=ocnu=0 # h heading, o other, t table, g group, i image @@ -866,6 +891,7 @@ has incorrect level and/or parent level} parent=node1=node2=node3=node4=node5=node6=nil node0='0:0;0' @collapsed_lv0=0 + @lev_occurences={ a: 0, b: 0, c: 0, d: 0, l1: 0, l2: 0, l3: 0 } data.each do |dob| h={} if (dob.obj !~ regex_exclude_ocn_and_node || dob.is==:code) \ @@ -875,7 +901,7 @@ has incorrect level and/or parent level} && dob.ocn_ #dob.ln now is determined, and set earlier, check how best to remove this --> if dob.is==:heading - ln=case dob.lv + @ln=ln=case dob.lv when 'A' then 0 when 'B' then 1 when 'C' then 2 @@ -905,11 +931,13 @@ has incorrect level and/or parent level} end if ln==0 \ or ln=~@md.lv0 + @lev_occurences[:a] += 1 if not dob.obj =~/~#|-#/ ocn_flag=true ocnh0+=1 #heading node0="0:#{ocnh0};#{ocn}" else + #document_structure_check_info(node0,node0,:error) #fix ocn_flag=false node0="0:0;0" end @@ -919,11 +947,13 @@ has incorrect level and/or parent level} node,ocn_sp,parent=node0,"h#{ocnh}",'ROOT' elsif ln==1 \ or ln=~@md.lv1 + @lev_occurences[:b] += 1 if not dob.obj =~/~#|-#/ ocn_flag=true ocnh1+=1 #heading node1="1:#{ocnh1};#{ocn}" else + #document_structure_check_info(node0,node0,:error) #fix ocn_flag=false node1="1:0;0" end @@ -932,6 +962,7 @@ has incorrect level and/or parent level} @collapsed_lv1=@collapsed_lv0+1 node0 else + warning_incorrect_parent_level_or_level(dob.obj) document_structure_check_info(node0,node0,:error) node0 end @@ -939,11 +970,13 @@ has incorrect level and/or parent level} node,ocn_sp,parent=node1,"h#{ocnh}",node0 #FIX elsif ln==2 \ or ln=~@md.lv2 + @lev_occurences[:c] += 1 if not dob.obj =~/~#|-#/ ocn_flag=true ocnh2+=1 node2="2:#{ocnh2};#{ocn}" else + #document_structure_check_info(node0,node0,:error) #fix ocn_flag=false node2="2:0;0" end @@ -952,6 +985,7 @@ has incorrect level and/or parent level} @collapsed_lv2=@collapsed_lv1+1 node1 else + warning_incorrect_parent_level_or_level(dob.obj) document_structure_check_info(node2,node0,:error) node0 end @@ -959,11 +993,13 @@ has incorrect level and/or parent level} node,ocn_sp=node2,"h#{ocnh}" elsif ln==3 \ or ln=~@md.lv3 + @lev_occurences[:d] += 1 if not dob.obj =~/~#|-#/ ocn_flag=true ocnh3+=1 node3="3:#{ocnh3};#{ocn}" else + #document_structure_check_info(node0,node0,:error) #fix ocn_flag=false node3="3:0;0" end @@ -988,6 +1024,7 @@ or this level should be level :B~ rather than #{dob.lv}} node,ocn_sp=node3,"h#{ocnh}" elsif ln==4 \ or ln=~@md.lv4 + @lev_occurences[:l1] += 1 if not dob.obj =~/~#|-#/ ocn_flag=true ocnh4+=1 @@ -1021,6 +1058,7 @@ or this level should be level :B~ rather than #{dob.lv}} node,ocn_sp=node4,"h#{ocnh}" elsif ln==5 \ or ln=~@md.lv5 + @lev_occurences[:l2] += 1 if not dob.obj =~/~#|-#/ ocn_flag=true ocnh5+=1 @@ -1049,6 +1087,7 @@ or this level should be level :B~ rather than #{dob.lv}} @collapsed_lv5=@collapsed_lv1+1 node1 else + warning_incorrect_parent_level_or_level(dob.obj) document_structure_check_info(node5,node0,:error) node0 end @@ -1056,6 +1095,7 @@ or this level should be level :B~ rather than #{dob.lv}} node,ocn_sp=node5,"h#{ocnh}" elsif ln==6 \ or ln=~@md.lv6 + @lev_occurences[:l3] += 1 if not dob.obj =~/~#|-#/ ocn_flag=true ocnh6+=1 @@ -1092,6 +1132,7 @@ or this level should be 5~ rather #{dob.lv}" #level 6 @collapsed_lv6=@collapsed_lv1+1 node1 else + warning_incorrect_parent_level_or_level(dob.obj) document_structure_check_info(node6,node0,:error) node0 end @@ -1099,6 +1140,29 @@ or this level should be 5~ rather #{dob.lv}" #level 6 node,ocn_sp=node6,"h#{ocnh}" end else + unless @lev_occurences[:l1] > 0 + STDERR.puts %{Substantive text objects must follow a level 1~ heading and there are none at this point in processing: #{@lev_occurences[:l1]} +} + end + unless @ln >= 4 + lev=case @ln + when 0 then 'A' + when 1 then 'B' + when 2 then 'C' + when 3 then 'D' + when 4 then '1' + when 5 then '2' + when 6 then '3' + when 7 then '4' + when 8 then '5' + when 9 then '6' + end + 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 + end if not dob.obj =~/~#|-#/ ocn_flag=true else @@ -1177,6 +1241,18 @@ or this level should be 5~ rather #{dob.lv}" #level 6 end @o_array << dob end + unless @lev_occurences[:a] == 1 + 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 + 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 + end @o_array end end diff --git a/lib/sisu/v6/composite.rb b/lib/sisu/v6/composite.rb index 79603e26..2afff1bf 100644 --- a/lib/sisu/v6/composite.rb +++ b/lib/sisu/v6/composite.rb @@ -198,7 +198,8 @@ module SiSU_Assemble file[:prepared] else cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX - STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires an invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}" + STDERR.puts %{SKIPPED processing file: [#{@opt.lng}] "#{@opt.fns}" it requires an invalid or non-existent file: "#{loadfile}"} + $process_document = :skip; break #remove this line to continue processing documents that have missing include files para end else tuned_file << para @@ -253,7 +254,8 @@ module SiSU_Assemble @ssm << loadfile else cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX - STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires an invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}" + STDERR.puts %{SKIPPED processing file: [#{@opt.lng}] "#{@opt.fns}" it requires an invalid or non-existent file: "#{loadfile}"} + $process_document = :skip; break #remove this line to continue processing documents that have missing include files para end end diff --git a/lib/sisu/v6/hub.rb b/lib/sisu/v6/hub.rb index 35e9140d..736fa8bc 100644 --- a/lib/sisu/v6/hub.rb +++ b/lib/sisu/v6/hub.rb @@ -264,12 +264,26 @@ module SiSU @msg,@msgs='',nil @tell=lambda { SiSU_Screen::Ansi.new(@opt.cmd,@msg,"#{@msgs.inspect if @msgs}") } end + def remove_skipped_files_if_any_from_processing_files_array + if @remove_faulty_markup_files_array.length > 0 + @opt.files = (@opt.files - @remove_faulty_markup_files_array) + end + end + def print_error_message_if_files_skipped + if @remove_faulty_markup_files_array.length > 0 + puts '---' + STDERR.puts 'ERROR with file(s), did not process: ' + @remove_faulty_markup_files_array.join(',') + end + end def do_loops + @remove_faulty_markup_files_array=[] if @opt.act[:zap][:set]==:on #% --zap, -Z do_loop_files_on_given_option_pre end do_each_file_loop_options + remove_skipped_files_if_any_from_processing_files_array do_loop_files_on_given_option_post + print_error_message_if_files_skipped end def do_each_file_loop_options @opt.files.each_with_index do |fno,i| @@ -290,6 +304,7 @@ module SiSU end @env=SiSU_Env::InfoEnv.new(@opt.fns) if @opt.act[:ao][:set]==:on #% --ao --dal, -m + $process_document = :ok unless @opt.act[:po4a][:set]==:on # --po4a, -P if @opt.fno =~ /\.ssm$/ require_relative 'composite' # composite.rb #pre-processing @@ -299,112 +314,117 @@ module SiSU SiSU_AO::Source.new(@opt).read end end - if @opt.act[:qrcode][:set]==:on #% --qrcode, -Q - require_relative 'qrcode' # qrcode.rb - SiSU_QRcode::Source.new(@opt).read - end - if @opt.act[:hash_digests][:set]==:on #% --hash-digests, -N digest tree - require_relative 'digests' # digests.rb - SiSU_DigestView::Source.new(@opt).read - end - if @opt.act[:txt][:set]==:on #% --txt, -t -a - require_relative 'txt_plain' # txt_plain.rb - SiSU_Txt_Plain::Source.new(@opt).read - end - if @opt.act[:txt_textile][:set]==:on #% --textile - require_relative 'txt_textile' # txt_textile.rb - SiSU_Txt_Textile::Source.new(@opt).read - end - if @opt.act[:txt_asciidoc][:set]==:on #% --asciidoc - require_relative 'txt_asciidoc' # txt_asciidoc.rb - SiSU_Txt_AsciiDoc::Source.new(@opt).read - end - if @opt.act[:txt_markdown][:set]==:on #% --markdown - require_relative 'txt_markdown' # txt_markdown.rb - SiSU_Txt_Markdown::Source.new(@opt).read - end - if @opt.act[:txt_rst][:set]==:on #% --rst, --rest - require_relative 'txt_rst' # txt_rst.rb - SiSU_Txt_rST::Source.new(@opt).read - end - if @opt.act[:html][:set]==:on #% --html, -h -H - require_relative 'html' # html.rb - SiSU_HTML::Source.new(@opt).read - else - if @opt.act[:html_seg][:set]==:on #% --html-seg (-h -H) - require_relative 'html' # html.rb - SiSU_HTML::Source.new(@opt).read + if $process_document == :ok + if @opt.act[:qrcode][:set]==:on #% --qrcode, -Q + require_relative 'qrcode' # qrcode.rb + SiSU_QRcode::Source.new(@opt).read + end + if @opt.act[:hash_digests][:set]==:on #% --hash-digests, -N digest tree + require_relative 'digests' # digests.rb + SiSU_DigestView::Source.new(@opt).read end - if @opt.act[:html_scroll][:set]==:on #% --html-scroll (-h -H) - require_relative 'html' # html.rb + if @opt.act[:txt][:set]==:on #% --txt, -t -a + require_relative 'txt_plain' # txt_plain.rb + SiSU_Txt_Plain::Source.new(@opt).read + end + if @opt.act[:txt_textile][:set]==:on #% --textile + require_relative 'txt_textile' # txt_textile.rb + SiSU_Txt_Textile::Source.new(@opt).read + end + if @opt.act[:txt_asciidoc][:set]==:on #% --asciidoc + require_relative 'txt_asciidoc' # txt_asciidoc.rb + SiSU_Txt_AsciiDoc::Source.new(@opt).read + end + if @opt.act[:txt_markdown][:set]==:on #% --markdown + require_relative 'txt_markdown' # txt_markdown.rb + SiSU_Txt_Markdown::Source.new(@opt).read + end + if @opt.act[:txt_rst][:set]==:on #% --rst, --rest + require_relative 'txt_rst' # txt_rst.rb + SiSU_Txt_rST::Source.new(@opt).read + end + if @opt.act[:html][:set]==:on #% --html, -h -H + require_relative 'html' # html.rb SiSU_HTML::Source.new(@opt).read + else + if @opt.act[:html_seg][:set]==:on #% --html-seg (-h -H) + require_relative 'html' # html.rb + SiSU_HTML::Source.new(@opt).read + end + if @opt.act[:html_scroll][:set]==:on #% --html-scroll (-h -H) + require_relative 'html' # html.rb + SiSU_HTML::Source.new(@opt).read + end end - end - if @opt.act[:concordance][:set]==:on #% --concordance, -w - require_relative 'concordance' # concordance.rb - SiSU_Concordance::Source.new(@opt).read - end - if @opt.act[:epub][:set]==:on #% --epub, -e - require_relative 'xhtml_epub2' # xhtml_epub2.rb - SiSU_XHTML_EPUB2::Source.new(@opt).read - end - if @opt.act[:odt][:set]==:on #% --odt, -o opendocument - require_relative 'xml_odf_odt' # xml_odf_odt.rb - SiSU_XML_ODF_ODT::Source.new(@opt).read - end - if @opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml - require_relative 'xhtml' # xhtml.rb - SiSU_XHTML::Source.new(@opt).read - end - if @opt.act[:xml_scaffold_structure_sisu][:set]==:on #% --xml-scaffold --xml-scaffold-sisu - require_relative 'xml_scaffold_structure_sisu' # xml_scaffold_structure_sisu.rb - SiSU_XML_Scaffold_Structure_Sisu::Source.new(@opt).read - end - if @opt.act[:xml_scaffold_structure_collapse][:set]==:on #% --xml-scaffold-collapse - require_relative 'xml_scaffold_structure_collapsed' # xml_scaffold_structure_collapsed.rb - SiSU_XML_Scaffold_Structure_Collapse::Source.new(@opt).read - end - if @opt.act[:xml_docbook_book][:set]==:on #% --xml-docbook - require_relative 'xml_docbook5' # xml_docbook5.rb - SiSU_XML_Docbook_Book::Source.new(@opt).read - end - if @opt.act[:xml_fictionbook][:set]==:on #% --xml-fictionbook - require_relative 'xml_fictionbook2' # xml_fictionbook2.rb - SiSU_XML_Fictionbook::Source.new(@opt).read - end - if @opt.act[:xml_sax][:set]==:on #% --xml-sax, -x xml sax type - require_relative 'xml_sax' # xml_sax.rb - SiSU_XML_SAX::Source.new(@opt).read - end - if @opt.act[:xml_dom][:set]==:on #% --xml-dom, -X xml dom type - require_relative 'xml_dom' # xml_dom.rb - SiSU_XML_DOM::Source.new(@opt).read - end - if @opt.act[:pdf][:set]==:on \ - or @opt.act[:pdf_p][:set]==:on \ - or @opt.act[:pdf_l][:set]==:on #% --pdf-l --pdf, -p latex/ texpdf - require_relative 'texpdf' # texpdf.rb - SiSU_TeX::Source.new(@opt).read - end - if @opt.act[:manpage][:set]==:on #% --manpage, -i - require_relative 'manpage' # manpage.rb - SiSU_Manpage::Source.new(@opt).read - end - if @opt.act[:texinfo][:set]==:on #% --texinfo, -I - require_relative 'texinfo' # texinfo.rb - SiSU_TexInfo::Source.new(@opt).read - end - if @opt.act[:sqlite_discrete][:set]==:on #% --sqlite, -d DB sqlite - require_relative 'dbi_discrete' # dbi_discrete.rb - SiSU_DBI_Discrete::SQL.new(@opt).build - end - if @opt.act[:manifest][:set]==:on #% --manifest, -y - require_relative 'manifest' # manifest.rb - ((@opt.act[:sisupod][:set]==:on \ - || @opt.act[:share_source][:set]==:on) \ - && @opt.files.length < 2 ) \ - ? nil - : SiSU_Manifest::Source.new(@opt).read + if @opt.act[:concordance][:set]==:on #% --concordance, -w + require_relative 'concordance' # concordance.rb + SiSU_Concordance::Source.new(@opt).read + end + if @opt.act[:epub][:set]==:on #% --epub, -e + require_relative 'xhtml_epub2' # xhtml_epub2.rb + SiSU_XHTML_EPUB2::Source.new(@opt).read + end + if @opt.act[:odt][:set]==:on #% --odt, -o opendocument + require_relative 'xml_odf_odt' # xml_odf_odt.rb + SiSU_XML_ODF_ODT::Source.new(@opt).read + end + if @opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml + require_relative 'xhtml' # xhtml.rb + SiSU_XHTML::Source.new(@opt).read + end + if @opt.act[:xml_scaffold_structure_sisu][:set]==:on #% --xml-scaffold --xml-scaffold-sisu + require_relative 'xml_scaffold_structure_sisu' # xml_scaffold_structure_sisu.rb + SiSU_XML_Scaffold_Structure_Sisu::Source.new(@opt).read + end + if @opt.act[:xml_scaffold_structure_collapse][:set]==:on #% --xml-scaffold-collapse + require_relative 'xml_scaffold_structure_collapsed' # xml_scaffold_structure_collapsed.rb + SiSU_XML_Scaffold_Structure_Collapse::Source.new(@opt).read + end + if @opt.act[:xml_docbook_book][:set]==:on #% --xml-docbook + require_relative 'xml_docbook5' # xml_docbook5.rb + SiSU_XML_Docbook_Book::Source.new(@opt).read + end + if @opt.act[:xml_fictionbook][:set]==:on #% --xml-fictionbook + require_relative 'xml_fictionbook2' # xml_fictionbook2.rb + SiSU_XML_Fictionbook::Source.new(@opt).read + end + if @opt.act[:xml_sax][:set]==:on #% --xml-sax, -x xml sax type + require_relative 'xml_sax' # xml_sax.rb + SiSU_XML_SAX::Source.new(@opt).read + end + if @opt.act[:xml_dom][:set]==:on #% --xml-dom, -X xml dom type + require_relative 'xml_dom' # xml_dom.rb + SiSU_XML_DOM::Source.new(@opt).read + end + if @opt.act[:pdf][:set]==:on \ + or @opt.act[:pdf_p][:set]==:on \ + or @opt.act[:pdf_l][:set]==:on #% --pdf-l --pdf, -p latex/ texpdf + require_relative 'texpdf' # texpdf.rb + SiSU_TeX::Source.new(@opt).read + end + if @opt.act[:manpage][:set]==:on #% --manpage, -i + require_relative 'manpage' # manpage.rb + SiSU_Manpage::Source.new(@opt).read + end + if @opt.act[:texinfo][:set]==:on #% --texinfo, -I + require_relative 'texinfo' # texinfo.rb + SiSU_TexInfo::Source.new(@opt).read + end + if @opt.act[:sqlite_discrete][:set]==:on #% --sqlite, -d DB sqlite + require_relative 'dbi_discrete' # dbi_discrete.rb + SiSU_DBI_Discrete::SQL.new(@opt).build + end + if @opt.act[:manifest][:set]==:on #% --manifest, -y + require_relative 'manifest' # manifest.rb + ((@opt.act[:sisupod][:set]==:on \ + || @opt.act[:share_source][:set]==:on) \ + && @opt.files.length < 2 ) \ + ? nil + : SiSU_Manifest::Source.new(@opt).read + end + else + @remove_faulty_markup_files_array << fno + $process_document=:ok end end end diff --git a/lib/sisu/v6/param.rb b/lib/sisu/v6/param.rb index 60c9bb54..19769027 100644 --- a/lib/sisu/v6/param.rb +++ b/lib/sisu/v6/param.rb @@ -1115,7 +1115,8 @@ module SiSU_Param && @creator.author.is_a?(String)) \ ? " #{@creator.author}" : '' - title=%{"#{@title.full.gsub(/(

|

|
|
)/,'')}",} + title=@title.full.gsub(/\s*(?:

|

|
|
)\s*/,' '). + gsub(/~\{.+?\}~/,'') SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Parameters',%{#{title}#{creator}}).txt_grey if @opt.act[:verbose][:set]==:on end if not @book_idx \ @@ -1317,7 +1318,7 @@ module SiSU_Param if @en[:note] > 0 \ and @en[:sum] > 0 if @en[:sum] > 0 - else SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'*WARN* both endnote styles used',"~{ #{@en[:sum]} }~ and ^~ #{@en[:mark]}").warn unless @opt.act[:unless][:set]==:on + else SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'*WARN* both endnote styles used',"~{ #{@en[:sum]} }~ and ^~ #{@en[:mark]}").warn unless @opt.act[:quiet][:set]==:on end end if @en[:mark] != @en[:note] \ @@ -1334,7 +1335,7 @@ module SiSU_Param and @opt.inspect =~/P/ #@title=Md.new('Text Insert',@opt,@env).title else - SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Title missing','please provide @title:').warn unless @opt.act[:unless][:set]==:on + SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Title missing','please provide @title:').warn unless @opt.act[:quiet][:set]==:on end end if @author !~/[\S]/ @@ -1342,7 +1343,7 @@ module SiSU_Param and @opt.inspect =~/P/ #@creator=SiSU_Param::Md.new('Text Insert',@opt,@env).creator else - SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Author missing','please provide @creator: :author:').warn unless @opt.act[:unless][:set]==:on + SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Author missing','please provide @creator: :author:').warn unless @opt.act[:quiet][:set]==:on end end @struct={} -- cgit v1.2.3