diff options
author | Ralph Amissah <ralph@amissah.com> | 2015-04-19 14:44:38 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2015-05-01 18:49:40 -0400 |
commit | 1323f18af45ea0d3aaef5cd9ead0efb5de8b9729 (patch) | |
tree | e1abd6d04547c269666f276d8bdb24afa9d7dfee /lib/sisu/current/ao_syntax.rb | |
parent | setup.rb s/Config/RbConfig/ (diff) |
c<-d: sync, roll develop into current dir branch (5==6)
* two dir branches, same library contents
(v5 synced & updated with v6)
Diffstat (limited to 'lib/sisu/current/ao_syntax.rb')
-rw-r--r-- | lib/sisu/current/ao_syntax.rb | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/lib/sisu/current/ao_syntax.rb b/lib/sisu/current/ao_syntax.rb index 554daae5..c3108668 100644 --- a/lib/sisu/current/ao_syntax.rb +++ b/lib/sisu/current/ao_syntax.rb @@ -61,8 +61,8 @@ module SiSU_AO_Syntax end end class Markup - def initialize(md='',data='') - @md,@data=md,data + def initialize(md='',data='',biblio=[]) + @md,@data,@bibliography=md,data,biblio @data_new=[] url_and_stub=SiSU_Env::InfoEnv.new.url @output_url="#{url_and_stub.remote}" @@ -221,6 +221,24 @@ module SiSU_AO_Syntax end def substitutions(dob) dob=dob.dup + dob=if @md.flag_auto_biblio \ + and @bibliography.length > 0 + dob=if dob.is !=:meta \ + && dob.is !=:heading_insert \ + && dob.is !=:code \ + && dob.is !=:comment \ + && dob.is !=:table + @bibliography.each do |c| + if c[:id] and not c[:id].nil? and not c[:id].empty? + dob.obj=dob.obj.gsub(/#{c[:id]}/mi,c[:short_name]) + end + end + dob + else dob + end + dob + else dob + end dob=if defined? @md.substitution_match_list[:match_and_replace] \ and @md.substitution_match_list[:match_and_replace].is_a?(Array) dob=if dob.is !=:meta \ |