aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-07-06 14:36:18 -0400
committerRalph Amissah <ralph@amissah.com>2010-07-06 14:36:18 -0400
commit57c4163076e66940ba57ad9b119becd79e0ac074 (patch)
tree2ff808c88c53ebe2431cc72fbef226c11d828ae6
parenturls, output info -t produces plaintext output (diff)
dal_syntax, constants, introduce #{ monospace }# tag
-rw-r--r--lib/sisu/v2/constants.rb2
-rw-r--r--lib/sisu/v2/dal_syntax.rb4
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/sisu/v2/constants.rb b/lib/sisu/v2/constants.rb
index 363bc65a..7fe795da 100644
--- a/lib/sisu/v2/constants.rb
+++ b/lib/sisu/v2/constants.rb
@@ -84,6 +84,7 @@ Mx[:fa_strike_o]= "#{Mx[:fa_o]}del#{Mx[:fa_o_c]}"; Mx[:fa_strike_c]= "
Mx[:fa_superscript_o]="#{Mx[:fa_o]}sup#{Mx[:fa_o_c]}"; Mx[:fa_superscript_c]="#{Mx[:fa_c_o]}sup#{Mx[:fa_c]}"
Mx[:fa_subscript_o]= "#{Mx[:fa_o]}sub#{Mx[:fa_o_c]}"; Mx[:fa_subscript_c]= "#{Mx[:fa_c_o]}sub#{Mx[:fa_c]}"
Mx[:fa_hilite_o]= "#{Mx[:fa_o]}hi#{Mx[:fa_o_c]}"; Mx[:fa_hilite_c]= "#{Mx[:fa_c_o]}hi#{Mx[:fa_c]}"
+Mx[:fa_monospace_o]= "#{Mx[:fa_o]}mono#{Mx[:fa_o_c]}"; Mx[:fa_monospace_c]= "#{Mx[:fa_c_o]}mono#{Mx[:fa_c]}"
Mx[:gl_bullet]= "#{Mx[:gl_o]}●#{Mx[:gl_c]}"
Mx[:pa_non_object_dummy_heading]="#{Mx[:pa_o]}-##{Mx[:pa_c]}" #unnumbered paragraph, delete when not required [used in dummy headings, eg. for segmented html] (place marker at end of paragraph)
Mx[:pa_non_object_no_heading]="#{Mx[:pa_o]}~##{Mx[:pa_c]}" #unnumbered paragraph (place marker at end of paragraph)
@@ -125,6 +126,7 @@ Px[:strike_o]= '-'; Px[:strike_c]= '-'
Px[:superscript_o]='^'; Px[:superscript_c]='^'
Px[:subscript_o]= '['; Px[:subscript_c]= ']'
Px[:hilite_o]= '*'; Px[:hilite_c]= '*'
+Px[:monospace_o]= ''; Px[:monospace_c]= ''
Px[:lv1]= '*'
Px[:lv2]= '='
Px[:lv3]= '='
diff --git a/lib/sisu/v2/dal_syntax.rb b/lib/sisu/v2/dal_syntax.rb
index 5e04730f..713bc886 100644
--- a/lib/sisu/v2/dal_syntax.rb
+++ b/lib/sisu/v2/dal_syntax.rb
@@ -253,6 +253,8 @@ module SiSU_Syntax
"\\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/,
"\\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]}|\(|\>)#\{(.+?)\}#/,
+ "\\1#{Mx[:fa_monospace_o]}\\2#{Mx[:fa_monospace_c]}") #monospace text
dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)\+\{(.+?)\}\+/,
"\\1#{Mx[:fa_insert_o]}\\2#{Mx[:fa_insert_c]}") #inserted text
dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s+|['"]|#{Mx[:nbsp]}|#{Mx[:fa_o_c]}|#{Mx[:fa_c]}|\(|\>)v\{(.+?)\}v/,
@@ -288,6 +290,7 @@ module SiSU_Syntax
# ,{subscript}, <sub>subscript</sub>
# +{inserted text}+ <ins>inserted text</ins>
# -{deleted text}- <del>deleted text</del>
+ # #{monospace text}#
#
# {url address}:url
# {image.png}imageurl
@@ -447,6 +450,7 @@ module SiSU_Syntax
# ,{subscript}, <sub>subscript</sub>
# +{inserted text}+ <ins>inserted text</ins>
# -{deleted text}- <del>deleted text</del>
+ # #{monospace text}#
# {url address}:url
# {image.png}imageurl
# {image.png}png