lib/mastalk/extensions.rb in mastalk-0.1.2 vs lib/mastalk/extensions.rb in mastalk-0.2.0

- old
+ new

@@ -13,10 +13,10 @@ @@extensions = [] def extension(start, stop = nil, new_line = false, &block) re_start = Regexp.escape(start) re_stop = stop == '$' ? stop : Regexp.escape(stop || start) - regex = Regexp.new("#{re_start}(.*)(#{re_stop})", new_line ? 0 : Regexp::MULTILINE) + regex = Regexp.new("#{re_start}(.*?)(#{re_stop}+)", new_line ? 0 : Regexp::MULTILINE) @@extensions << [regex, block] end def extensions return @@extensions unless @@extensions.empty?