aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2012-10-01 15:23:47 -0400
committerRalph Amissah <ralph@amissah.com>2012-10-01 15:23:47 -0400
commitef4da2e9bf2b690e484d8bda196a178f986aeaec (patch)
treefd7e8521df14cc97ea3025fe755f27b891b3ded9
parentv3: html, epub, group text, bullet, fix (diff)
v3: dal_syntax, new syntax: =\\= page new & -\\- page break
* alias for <:pn> and <:pb> respectively
-rw-r--r--data/doc/sisu/CHANGELOG_v33
-rw-r--r--lib/sisu/v3/constants.rb4
-rw-r--r--lib/sisu/v3/dal_doc_str.rb6
-rw-r--r--lib/sisu/v3/dal_syntax.rb6
4 files changed, 13 insertions, 6 deletions
diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3
index b470bec8..ed0411e7 100644
--- a/data/doc/sisu/CHANGELOG_v3
+++ b/data/doc/sisu/CHANGELOG_v3
@@ -60,6 +60,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.3.3.orig.tar.xz
* v3: html, epub, fix
* group text, bullet
+* v3: dal_syntax, new syntax: =\\= page new & -\\- page break
+ alias for <:pn> and <:pb> respectively
+
%% 3.3.2.orig.tar.xz (2012-06-30:26/6)
http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.3.2
http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.3.2-1
diff --git a/lib/sisu/v3/constants.rb b/lib/sisu/v3/constants.rb
index a4de5898..a786a8b4 100644
--- a/lib/sisu/v3/constants.rb
+++ b/lib/sisu/v3/constants.rb
@@ -98,8 +98,8 @@ Mx={
br_nl: '╲', #lB ▌ 』 ┘
br_paragraph: '█', #FB █ 9608 # PP ∥ 8741 #▐ #'┘' #'¶' #FB █ 9608 lB ▌ 9612 RB ▐ 9616
br_obj: 'break_obj',
- br_page: 'break_page',
- br_page_new: 'break_page_new',
+ br_page: '┼',
+ br_page_new: '╋',
lnk_o: '⌠', lnk_c: '⌡', #'⌈' '⌋' '⌠' '⌡' #Mx[:lnk_o: '◁'; Mx[:lnk_c: '▷' #‹ ›
url_o: '「', url_c: '」',
rel_o: '⌈', rel_c: '⌋',
diff --git a/lib/sisu/v3/dal_doc_str.rb b/lib/sisu/v3/dal_doc_str.rb
index ab5f9199..0abaf4d0 100644
--- a/lib/sisu/v3/dal_doc_str.rb
+++ b/lib/sisu/v3/dal_doc_str.rb
@@ -233,11 +233,11 @@ module SiSU_DAL_DocumentStructureExtract
end
else nil
end
- when /^[<\[](?:br)?:(?:pa?r|o(?:bj|---)?)[>\]]\s*$/ #[br:par] #[br:obj]
+ when /^<(?:br)?:(?:pa?r|o(?:bj|---)?)>\s*$/ #[br:par] #[br:obj]
SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_obj])
- when /^(?:[<\[](?:br)?:pg[>\]]|<?:pb>?)\s*$/ #[br:pg]
+ when /^(?:-\\\\-|<:pb>)\s*$/ #[br:pg]
SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page])
- when /^[<\[](?:br)?:pg?n[>\]]\s*$/ #[br:pgn]
+ when /^(?:=\\\\=|<:pn>)\s*$/ #[br:pgn]
SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_new])
else #paragraph
image=image_test(t_o)
diff --git a/lib/sisu/v3/dal_syntax.rb b/lib/sisu/v3/dal_syntax.rb
index 8f029fe5..75bb8f53 100644
--- a/lib/sisu/v3/dal_syntax.rb
+++ b/lib/sisu/v3/dal_syntax.rb
@@ -141,7 +141,11 @@ module SiSU_DAL_Syntax
&& dob.is !=:comment \
&& dob.is !=:code \
&& dob.is !=:table
- dob.obj=dob.obj.gsub(/ \\\\(?: |$)/,"#{Mx[:br_line]}").
+ dob.obj=dob.obj.gsub(/^-\\\\-\s*$/,"#{Mx[:br_page]}").
+ gsub(/^=\\\\=\s*$/,"#{Mx[:br_page_new]}").
+ gsub(/ \\\\(?: |$)/,"#{Mx[:br_line]}").
+ gsub(/(?:<:?pb>)/,"#{Mx[:br_page]}"). # depreciated
+ gsub(/(?:<:?pn>)/,"#{Mx[:br_page_new]}"). # depreciated
gsub(/(?:<:?br>|<br \/>)/,"#{Mx[:br_line]}") # depreciated
end
dob