aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--data/doc/sisu/CHANGELOG_v22
-rw-r--r--data/doc/sisu/CHANGELOG_v32
-rw-r--r--lib/sisu/v2/dal_doc_str.rb14
-rw-r--r--lib/sisu/v3/dal_doc_str.rb14
4 files changed, 22 insertions, 10 deletions
diff --git a/data/doc/sisu/CHANGELOG_v2 b/data/doc/sisu/CHANGELOG_v2
index 94db9176..a9487585 100644
--- a/data/doc/sisu/CHANGELOG_v2
+++ b/data/doc/sisu/CHANGELOG_v2
@@ -16,6 +16,8 @@ Reverse Chronological:
http://git.sisudoc.org/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/3.0.6-1
* (ruby 1.9.2 (transition related) fixes)
+ * dal_doc_str
+ * empty line not paragraph object
* dal_images, image path setting
* param, nested regex match backport from v3
* cgi sample-search-form, string output (also cleaned unused help text)
diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3
index 2481d41b..e39a12ed 100644
--- a/data/doc/sisu/CHANGELOG_v3
+++ b/data/doc/sisu/CHANGELOG_v3
@@ -21,6 +21,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.6.orig.tar.gz
sisu_3.0.6-1.debian.tar.gz
* (ruby 1.9.2 (transition related) fixes)
+ * dal_doc_str
+ * empty line not paragraph object
* dal_images, image path setting
* cgi sample-search-form, string output (also cleaned unused help text)
diff --git a/lib/sisu/v2/dal_doc_str.rb b/lib/sisu/v2/dal_doc_str.rb
index 56bf205f..94f668a5 100644
--- a/lib/sisu/v2/dal_doc_str.rb
+++ b/lib/sisu/v2/dal_doc_str.rb
@@ -178,8 +178,10 @@ module SiSU_document_structure_extract
image=image_test(obj)
note=endnote_test?(obj)
obj,tags=extract_tags(obj)
- h={:bullet_=>bullet,:indent=>indent,:obj=>obj,:idx=>idx,:note_=>note,:image_=>image,:tags=>tags}
- SiSU_document_structure::Object_para.new.paragraph(h)
+ unless obj=~/\A\s*\Z/m
+ h={:bullet_=>bullet,:indent=>indent,:obj=>obj,:idx=>idx,:note_=>note,:image_=>image,:tags=>tags}
+ SiSU_document_structure::Object_para.new.paragraph(h)
+ end
else nil
end
when /^<?:p[bn]>?\s*$/
@@ -193,8 +195,10 @@ module SiSU_document_structure_extract
image=image_test(t_o)
note=endnote_test?(t_o)
obj,tags=extract_tags(t_o)
- h={:bullet_=>false,:indent=>0,:obj=>obj,:idx=>idx,:note_=>note,:image_=>image,:tags=>tags}
- SiSU_document_structure::Object_para.new.paragraph(h)
+ unless obj=~/\A\s*\Z/m
+ h={:bullet_=>false,:indent=>0,:obj=>obj,:idx=>idx,:note_=>note,:image_=>image,:tags=>tags}
+ SiSU_document_structure::Object_para.new.paragraph(h)
+ end
end
elsif not @@flag['code']
if t_o =~/^code\{/
@@ -786,7 +790,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+?>|^<:\#|<:- |<[:!]!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]}|\A\s*\Z/mi #ocn here #&nbsp; added with Tune.code #¡
parent=node1=node2=node3=node4=node5=node6=nil
data.each do |dob|
h={}
diff --git a/lib/sisu/v3/dal_doc_str.rb b/lib/sisu/v3/dal_doc_str.rb
index 6ce77057..8da571e4 100644
--- a/lib/sisu/v3/dal_doc_str.rb
+++ b/lib/sisu/v3/dal_doc_str.rb
@@ -179,8 +179,10 @@ module SiSU_document_structure_extract
image=image_test(obj)
note=endnote_test?(obj)
obj,tags=extract_tags(obj)
- h={ bullet_: bullet, indent: indent, obj: obj, idx: idx, note_: note, image_: image, tags: tags }
- SiSU_document_structure::Object_para.new.paragraph(h)
+ unless obj=~/\A\s*\Z/m
+ h={ bullet_: bullet, indent: indent, obj: obj, idx: idx, note_: note, image_: image, tags: tags }
+ SiSU_document_structure::Object_para.new.paragraph(h)
+ end
else nil
end
when /^[<\[](?:br)?:(?:pa?r|o(?:bj|---)?)[>\]]\s*$/ #[br:par] #[br:obj]
@@ -193,8 +195,10 @@ module SiSU_document_structure_extract
image=image_test(t_o)
note=endnote_test?(t_o)
obj,tags=extract_tags(t_o)
- h={ bullet_: false, indent: 0, obj: obj, idx: idx, note_: note, image_: image, tags: tags }
- SiSU_document_structure::Object_para.new.paragraph(h)
+ unless obj=~/\A\s*\Z/m
+ h={ bullet_: false, indent: 0, obj: obj, idx: idx, note_: note, image_: image, tags: tags }
+ SiSU_document_structure::Object_para.new.paragraph(h)
+ end
end
elsif not @@flag['code']
if t_o =~/^code\{/
@@ -803,7 +807,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+?>|^<:\#|<:- |<[:!]!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]}|\A\s*\Z/mi #ocn here #&nbsp; added with Tune.code #¡
parent=node1=node2=node3=node4=node5=node6=nil
data.each do |dob|
h={}