diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2008-06-12 10:42:53 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2008-06-12 10:42:53 +0000 |
commit | 0d01365d53c456d246da0ca1f0b3cd9868f02b35 (patch) | |
tree | 01a655c8028e17cfb371456b299c1848fe08c05b /Master/texmf-dist/scripts/context/ruby/xmltools.rb | |
parent | 44f3714442da07fdfc36a7f2a8dcd5d4294c5d26 (diff) |
ConTeXt release 2008.05.21
git-svn-id: svn://tug.org/texlive/trunk@8691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/context/ruby/xmltools.rb')
-rw-r--r-- | Master/texmf-dist/scripts/context/ruby/xmltools.rb | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Master/texmf-dist/scripts/context/ruby/xmltools.rb b/Master/texmf-dist/scripts/context/ruby/xmltools.rb index 5b4a112b8b5..c28df200dd6 100644 --- a/Master/texmf-dist/scripts/context/ruby/xmltools.rb +++ b/Master/texmf-dist/scripts/context/ruby/xmltools.rb @@ -15,7 +15,7 @@ # This script will harbor some handy manipulations on tex # related files. -banner = ['XMLTools', 'version 1.2.1', '2002/2006', 'PRAGMA ADE/POD'] +banner = ['XMLTools', 'version 1.2.2', '2002/2007', 'PRAGMA ADE/POD'] $: << File.expand_path(File.dirname($0)) ; $: << File.join($:.last,'lib') ; $:.uniq! @@ -466,35 +466,35 @@ class Commands elements = Array.new preamble = "" done = false - data.sub!(/^(.*?)\s*(<[a-z])/mois) do + data.sub!(/^(.*?)\s*(<[a-z])/moi) do preamble = $1 $2 end # hide elements - data.gsub!(/<(.*?)>/mois) do + data.gsub!(/<([^>]*?)>/moi) do elements << $1 "<#{elements.length}>" end # abc[-/]def - data.gsub!(/([a-z]{3,})([\/\-])([a-z]{3,})/mois) do + data.gsub!(/([a-z]{3,})([\/\-\(\)]+)([a-z]{3,})/moi) do done = true report("compound: #{$1}#{$2}#{$3}") if verbose "#{$1}<compound token='#{$2}'/>#{$3}" end # (abcd - data.gsub!(/(\()([a-z]{4,})/mois) do - done = true - report("compound: #{$1}#{$2}") if verbose - "<compound token='#{$1}'/>#{$2}" - end + # data.gsub!(/(\()([a-z]{4,})/moi) do + # done = true + # report("compound: #{$1}#{$2}") if verbose + # "<compound token='#{$1}'/>#{$2}" + # end # abcd) - data.gsub!(/(\()([a-z]{4,})/mois) do - done = true - report("compound: #{$1}#{$2}") if verbose - "#{$2}<compound token='#{$2}'/>" - end + # data.gsub!(/(\()([a-z]{4,})/moi) do + # done = true + # report("compound: #{$1}#{$2}") if verbose + # "#{$2}<compound token='#{$2}'/>" + # end # roll back elements - data.gsub!(/<(\d+)>/mois) do + data.gsub!(/<(\d+)>/moi) do "<#{elements.shift}>" end File.open(newname,'wb') do |f| |