aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/dal_syntax.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/dal_syntax.rb')
-rw-r--r--lib/sisu/v3/dal_syntax.rb18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/sisu/v3/dal_syntax.rb b/lib/sisu/v3/dal_syntax.rb
index 5b308009..b21f94a5 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
@@ -234,7 +238,7 @@ module SiSU_DAL_Syntax
def substitutions(dob)
dob=dob.dup
dob=if defined? @md.make.substitute[:match_and_replace] \
- and @md.make.substitute[:match_and_replace].class == Array
+ and @md.make.substitute[:match_and_replace].is_a?(Array)
dob=if dob.is !=:meta \
&& dob.is !=:heading_insert \
&& dob.is !=:code \
@@ -281,8 +285,10 @@ module SiSU_DAL_Syntax
w=w.gsub(@vz.markup_make_bold,"#{Mx[:fa_bold_o]}\\1#{Mx[:fa_bold_c]}")
end
else
- w=if w =~ /(?:^!_|^#{Mx[:lv_o]}[7-9]:\S*?#{Mx[:lv_c]})\s+/; embolden(w) #bold paragraph/emphasize #may wish to remove think about 7{ 8{ conversion not satisfactory, as information is lost!
- elsif w =~/^\/_\s+/; italicise(w)
+ w=if w =~ /(?:^!_|^#{Mx[:lv_o]}[7-9]:\S*?#{Mx[:lv_c]})\s+/
+ embolden(w) #bold paragraph/emphasize #may wish to remove think about 7{ 8{ conversion not satisfactory, as information is lost!
+ elsif w =~/^\/_\s+/
+ italicise(w)
else w
end
end
@@ -453,8 +459,8 @@ module SiSU_DAL_Syntax
dob=fontface(dob)
dob.obj=dob.obj.gsub(/<[:e]\s+(.+?)!?>/,
"#{Mx[:en_a_o]}\\1#{Mx[:en_a_c]}"). #not tested
- gsub(/^\s*_\*\s*/,
- "#{Mx[:gl_bullet]}"). #bullets, shortcut
+ gsub(/(^|#{Mx[:br_nl]})\s*_\*\s*/,
+ "\\1#{Mx[:gl_bullet]}"). #bullets, shortcut
gsub(/=\{(.+?)\}/,
"#{Mx[:idx_o]}\\1#{Mx[:idx_c]}").
gsub(/^\s*_([1-9])\*\s*/,