From 173a8becc4250e65af6c8ce71914f2a7052c9dd4 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 22 Apr 2012 13:47:22 -0400 Subject: v3: shared_html_lite, codeblock fix, affecting sql * SELECT ocn,body FROM doc_objects WHERE t_is='code'; --- lib/sisu/v3/db_import.rb | 5 ++++- lib/sisu/v3/shared_html_lite.rb | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v3/db_import.rb b/lib/sisu/v3/db_import.rb index e4f90e1d..a31a0d2d 100644 --- a/lib/sisu/v3/db_import.rb +++ b/lib/sisu/v3/db_import.rb @@ -267,6 +267,7 @@ module SiSU_DbImport || :block \ || :group # regular text what of code-blocks grouped text etc. notedata=data.obj.dup + #% :headings if data.is==:heading \ && (data.ln.inspect=~/[123]/) @col[:lev],txt,@col[:ocn],@col[:lev_an],@col[:ocnd],@col[:ocns],@col[:t_of],@col[:t_is],@col[:node],@col[:parent],@col[:digest_clean],@col[:digest_all]=data.ln,data.obj,data.ocn,data.lv,data.odv,data.osp,data.of,data.is,data.node,data.parent,'','' @@ -375,10 +376,12 @@ module SiSU_DbImport t=SiSU_DbTuple::LoadDocuments.new(@conn,@col,@opt,@file_maint) @tuple_array << t.tuple @col[:lev]=@col[:plaintext]=@col[:body]='' + #% :structure :layout :comment elsif data.of==:structure \ || data.of==:layout \ || data.of==:comment #added watch + #% : else #% regular text @col[:lid]+=1 txt='' @@ -392,7 +395,7 @@ module SiSU_DbImport @base_url="#{@env.url.root}/#{@md.fnb}/#{@hname}.html" txt=endnotes(txt).extract_any if @sql_type=~/pg/ \ - and txt.size > (SiSU_DbColumns::ColumnSize.new.document_clean - 1) #% examine pg build & remove limitation + and txt.size > (SiSU_DbColumns::ColumnSize.new.document_clean - 1) # examine pg build & remove limitation puts "\n\nTOO LARGE (TXT - see error log)\n\n" open("#{Dir.pwd}/pg_documents_error_log",'a') do |error| error.puts("\n#{@opt.fns}\nTEXT BODY\n#{@col[:body].size} object #{@col[:ocn]} -> #{@col[:body].slice(0..500)}") diff --git a/lib/sisu/v3/shared_html_lite.rb b/lib/sisu/v3/shared_html_lite.rb index 27a228eb..42edbdab 100644 --- a/lib/sisu/v3/shared_html_lite.rb +++ b/lib/sisu/v3/shared_html_lite.rb @@ -165,7 +165,8 @@ module SiSU_FormatShared gsub(/(#{Mx[:lnk_c]})#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,'\1\2'). #special case \{ e.g. \}http://url gsub(/(^|#{Mx[:gl_c]}|\s)#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,%{\\1#{@brace_url.xml_open}\\2#{@brace_url.xml_close}\\3}) #http ftp matches with decoration else - s.gsub(//m,'>') + s.gsub(//m,'>') end s end -- cgit v1.2.3