lib/review/latexutils.rb in review-1.2.0 vs lib/review/latexutils.rb in review-1.3.0

- old
+ new

@@ -65,17 +65,19 @@ str.gsub(METACHARS_RE) {|s| METACHARS[s] or raise "unknown trans char: #{s}" } end - alias escape escape_latex + alias_method :escape, :escape_latex def unescape_latex(str) metachars_invert_re = Regexp.new(METACHARS_INVERT.keys.collect{|key| Regexp.escape(key)}.join('|')) str.gsub(metachars_invert_re) {|s| METACHARS_INVERT[s] or raise "unknown trans char: #{s}" } end + + alias_method :unescape, :unescape_latex def escape_index(str) str.gsub(/[@!|"]/) {|s| '"' + s } end