aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/dal_doc_str.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-12-16 23:19:35 -0500
committerRalph Amissah <ralph@amissah.com>2010-12-16 23:46:13 -0500
commitff4ceb260ae3931072810a0ada124841d3b8e032 (patch)
treea736b8a7c4d7ce046d23f3cc834619e374f9bf68 /lib/sisu/v2/dal_doc_str.rb
parentdal_syntax, sisu syntax modification (insist on curly braces) (diff)
document objects: page break; object separator (introduced & used, adjust later)
* object separator introduced (requested Cory Doctorow, implementation not discussed) * dal_syntax, object separator syntax (<:---> or <:ols>) * constants, object separator * vim syntax highlighting, match object separator * document objects: page break; object separator (introduced & used) * dal, page break and object separator objects * represent page break and object separator: plaintext, html, epub, odf, texpdf (adjust later)
Diffstat (limited to 'lib/sisu/v2/dal_doc_str.rb')
-rw-r--r--lib/sisu/v2/dal_doc_str.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/sisu/v2/dal_doc_str.rb b/lib/sisu/v2/dal_doc_str.rb
index f1282df2..bca3cf7d 100644
--- a/lib/sisu/v2/dal_doc_str.rb
+++ b/lib/sisu/v2/dal_doc_str.rb
@@ -182,11 +182,13 @@ module SiSU_document_structure_extract
SiSU_document_structure::Object_para.new.paragraph(h)
else nil
end
- when /^(?:<?:p[bn]>?)\s*$/
- if t_o =~/^(?:<?:pn>?)\s*$/
+ when /^<?:p[bn]>?\s*$/
+ if t_o =~/^<?:pn>?\s*$/
SiSU_document_structure::Object_layout.new.break(Hx[:br_page_new])
else SiSU_document_structure::Object_layout.new.break(Hx[:br_page])
end
+ when /^<?:(?:ols|---)>?\s*$/
+ SiSU_document_structure::Object_layout.new.break(Hx[:obj_ln_sep])
else #paragraph
image=image_test(t_o)
note=endnote_test?(t_o)
@@ -784,7 +786,7 @@ module SiSU_document_structure_extract
@o_array=[]
node=ocn=ocn_dv=ocn_sp=ocnh=ocnh1=ocnh2=ocnh3=ocnh4=ocnh5=ocnh6=ocno=ocnp=ocnt=ocnc=ocng=ocni=ocnm=ocnu=ocnk=nm=0 # h heading, o other, t table, g group, i image
node_count_flag=false
- regex_exclude_ocn_and_node = /#{Rx[:meta]}|^@\S+?:\s|^4~endnotes|^#{Mx[:lv_o]}4:endnotes#{Mx[:lv_c]}|^\^~ |<:e[:_]\d+?>|^#{Mx[:fa_o]}p[bn]#{Mx[:fa_c]}|^<:\#|<:- |<[:!]!4|<hr width|#{Mx[:br_endnotes]}/i #ocn here #&nbsp; added with Tune.code #¡
+ regex_exclude_ocn_and_node = /#{Rx[:meta]}|^@\S+?:\s|^4~endnotes|^#{Mx[:lv_o]}4:endnotes#{Mx[:lv_c]}|^\^~ |<:e[:_]\d+?>|^<:\#|<:- |<[:!]!4|<hr width|#{Mx[:br_endnotes]}/i #ocn here #&nbsp; added with Tune.code #¡
parent=node1=node2=node3=node4=node5=node6=nil
data.each do |dob|
h={}