lib/govspeak.rb in govspeak-0.8.7 vs lib/govspeak.rb in govspeak-0.8.8
- old
+ new
@@ -47,12 +47,12 @@
def self.surrounded_by(open, close=nil)
open = Regexp::escape(open)
if close
close = Regexp::escape(close)
- %r+(?:\r|\n|^)#{open}(.*?)#{close}(\r|\n|$)?+m
+ %r+(?:\r|\n|^)#{open}(.*?)#{close} *(\r|\n|$)?+m
else
- %r+(?:\r|\n|^)#{open}(.*?)#{open}?(\r|\n|$)+m
+ %r+(?:\r|\n|^)#{open}(.*?)#{open}? *(\r|\n|$)+m
end
end
def self.wrap_with_div(class_name, character, parser=Kramdown::Document)
extension(class_name, surrounded_by(character)) { |body|