aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-12-09 11:03:50 -0500
committerRalph Amissah <ralph@amissah.com>2010-12-09 11:04:08 -0500
commit5f1bdade38a03dc9333d962dd2f2cb705da3d3f1 (patch)
treee22e4b52a30e9b33aafa40dfb9c69842fd3901d5 /lib
parentdal, multiline-match to permit line-wrap on bullet text (and headings) (diff)
dal, markup syntax (fontface) multi-line match, for line-wrap text
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v2/dal_syntax.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/sisu/v2/dal_syntax.rb b/lib/sisu/v2/dal_syntax.rb
index 01604b65..0422d7b3 100644
--- a/lib/sisu/v2/dal_syntax.rb
+++ b/lib/sisu/v2/dal_syntax.rb
@@ -235,33 +235,33 @@ module SiSU_Syntax
dob
end
def fontface(dob)
- dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|#{Mx[:lnk_o]}|#{Mx[:br_line]}|#{Mx[:br_paragraph]}|[\(\[\{]|\>)\*\{(.+?)\}\*/,
+ dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|#{Mx[:lnk_o]}|#{Mx[:br_line]}|#{Mx[:br_paragraph]}|[\(\[\{]|\>)\*\{(.+?)\}\*/m,
"\\1#{@emph[:o]}\\2#{@emph[:c]}") #emphasis
- dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|#{Mx[:lnk_o]}|#{Mx[:br_line]}|#{Mx[:br_paragraph]}|[\(\[\{]|\>)!\{(.+?)\}!/,
+ dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[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[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|#{Mx[:lnk_o]}|#{Mx[:br_line]}|#{Mx[:br_paragraph]}|[\(\[\{]|\>)#\{(.+?)\}#/m,
"\\1#{Mx[:fa_monospace_o]}\\2#{Mx[:fa_monospace_c]}") #monospace
- dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)\"\{(.+?)\}\"/,
+ dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)\"\{(.+?)\}\"/m,
"\\1#{Mx[:fa_cite_o]}\\2#{Mx[:fa_c_o]}cite#{Mx[:fa_c]}") #cite /blockquote?
- dob.obj.gsub!(/(^|[^\\])\^\{(.+?)\}\^/,
+ dob.obj.gsub!(/(^|[^\\])\^\{(.+?)\}\^/m,
"\\1#{Mx[:fa_superscript_o]}\\2#{Mx[:fa_superscript_c]}") #superscript
- dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|\(|\>|\S)9\{(.+?)\}9/,
+ dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|\(|\>|\S)9\{(.+?)\}9/m,
"\\1#{Mx[:fa_superscript_o]}\\2#{Mx[:fa_superscript_c]}") #superscript
- dob.obj.gsub!(/(^|[^\\]),\{(.+?)\},/,
+ dob.obj.gsub!(/(^|[^\\]),\{(.+?)\},/m,
"\\1#{Mx[:fa_subscript_o]}\\2#{Mx[:fa_subscript_c]}") #subscript
- dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)6\{(.+?)\}6/,
+ dob.obj.gsub!(/(^|#{Mx[:gl_c]}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