diff options
author | Ralph Amissah <ralph@amissah.com> | 2008-08-12 23:37:42 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2008-08-12 23:37:42 -0400 |
commit | d43865fb6a093625a77e8605d6fb00158546e1e4 (patch) | |
tree | 5386383af935307af234e4389e8c243ee3368f83 /lib/sisu/v0/dal_syntax.rb | |
parent | sisu-0.68.0 + sha256 (diff) |
html increased use of css; dal, middle layer, url representation, interim commit
Diffstat (limited to 'lib/sisu/v0/dal_syntax.rb')
-rw-r--r-- | lib/sisu/v0/dal_syntax.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/sisu/v0/dal_syntax.rb b/lib/sisu/v0/dal_syntax.rb index c3bd8a7d..35f0582a 100644 --- a/lib/sisu/v0/dal_syntax.rb +++ b/lib/sisu/v0/dal_syntax.rb @@ -273,10 +273,12 @@ module SiSU_Syntax line.gsub!(/^(#{Mx[:lv_o]}[56]:(\S+?)#{Mx[:lv_c]})\s*(.+)/,"\\1 \\3 #{Mx[:mk_o]}:name#\\2#{Mx[:mk_c]}") #html name marker <a name="\\1"></a>, however at present takes you to correct position within sub-toc, will nneed to clean from sub-toc leaving in main body only line.gsub!(/(?:<:?br>|<br \/>)/,"#{Mx[:br_line]}") #indent used in endnotes, not implemented, replace when ready with: line.gsub!(/(?:<br>|<br \/>)\s*_([12])\s+/,'<br><:i\1> ') if line=~/(^|#{Mx[:gl_c]}| )\{~\^ (.+?)\s*\}((?:https?|file|ftp):\S+)\s*#{Mx[:en_a_o]}(.+?)#{Mx[:en_a_c]}/m - line.gsub!(/(^|#{Mx[:gl_c]}| )\{~\^ ([^}]+?)\s*\}((?:https?|file|ftp):\S+)\s*#{Mx[:en_a_o]}(.+?)#{Mx[:en_a_c]}/m,"\\1{ \\2 }\\3 #{Mx[:en_a_o]} \\3 \\4 #{Mx[:en_a_c]}") # watch + line.gsub!(/(^|#{Mx[:gl_c]}| )\{~\^ ([^}]+?)\s*\}((?:https?|file|ftp):\S+)\s*#{Mx[:en_a_o]}(.+?)#{Mx[:en_a_c]}/m, + "\\1#{Mx[:lnk_o]}\\2#{Mx[:lnk_c]}\\3 #{Mx[:en_a_o]} \\3 \\4 #{Mx[:en_a_c]}") # watch end if line=~/(^|#{Mx[:gl_c]}| )\{~\^ (.+?)\s*\}((?:https?|file|ftp):\S+?)([;,.]?(?=\s|$))/m - line.gsub!(/(^|#{Mx[:gl_c]}| )\{~\^ (.+?)\s*\}((?:https?|file|ftp):\S+?)([;,.]?(?=\s|$))/m,"\\1{ \\2 }\\3\\4 #{Mx[:en_a_o]} \\3 #{Mx[:en_a_c]} ") + line.gsub!(/(^|#{Mx[:gl_c]}| )\{~\^ (.+?)\s*\}((?:https?|file|ftp):\S+?)([;,.]?(?=\s|$))/m, + "\\1#{Mx[:lnk_o]}\\2#{Mx[:lnk_c]}\\3\\4 #{Mx[:en_a_o]} \\3 #{Mx[:en_a_c]} ") #text url endnote url shortcut {~^ [text] }http://url is { [text] }http://url #{Mx[:en_a_o]} http://url #{Mx[:en_a_c]} [plus adjustment for commas] #means for this class, non-object, un-numbered ~# will not work # shortcut should not be used in conjunction with rebgular matches #reversed order, and addition of no-tilde.. end @@ -326,8 +328,9 @@ module SiSU_Syntax #line.gsub!(/<:\/hi>/,'</span>') line.gsub!(/(#{Mx[:gr_o]}verse#{Mx[:gr_c]}.+)/m,"\\1\n") line.gsub!(/[ ]+($)/,'\1') - #line.gsub!(/\{(.+?)\}(https?:\S+)/,"#{Mx[:lnk_o]}\\1#{Mx[:lnk_c]}\\2") #linked (text or image) - #line.gsub!(/\{(.+?)\}(image)/,"#{Mx[:lnk_o]}\\1#{Mx[:lnk_c]}\\2") #linked image + line.gsub!(/\{\s*(.+?)\s*\}(https?:\S+)/,"#{Mx[:lnk_o]}\\1#{Mx[:lnk_c]}\\2") #linked (text or image) + line.gsub!(/\{\s*(.+?)\s*\}(image)/,"#{Mx[:lnk_o]}\\1#{Mx[:lnk_c]}\\2") #linked image + #line.gsub!(/(#{Mx[:lnk_c]})\s*((?:https?|file|ftp):\S+?)/m,'\1\2') ##semantic #line.gsub!(/([a-z](?:[a-z_:.]+?[a-z])?)+(?::\{(.+?)\}:\1)/m,"\\1#{Mx[:sm_set_o]}\\2#{Mx[:sm_set_c]}\\1") #line.gsub!(/;\{\s*(.+?)\s*\};([a-z]+(?:[_:.][a-z]+)*)/,"#{Mx[:sm_subset_o]}\\1#{Mx[:sm_subset_c]}\\2") |