# File lib/maruku/input/parse_doc.rb, line 134 def search_abbreviations abbreviations.each do |abbrev, title| reg = Regexp.new(Regexp.escape(abbrev)) replace_each_string do |s| # bug if many abbreviations are present (agorf) p = StringScanner.new(s) a = [] until p.eos? o = '' o << p.getch until p.scan(reg) or p.eos? a << o unless o.empty? a << md_abbr(abbrev.dup, title ? title.dup : nil) if p.matched == abbrev end a end end end