diff --git a/lib/govspeak.rb b/lib/govspeak.rb index 101a05ce..e7a7f2a3 100644 --- a/lib/govspeak.rb +++ b/lib/govspeak.rb @@ -87,6 +87,7 @@ def structured_headers end def preprocess(source) + source = Govspeak::BlockquoteExtraQuoteRemover.remove(source) @@extensions.each do |title,regexp,block| source.gsub!(regexp) { instance_exec(*Regexp.last_match.captures, &block) diff --git a/test/govspeak_test.rb b/test/govspeak_test.rb index 9bae8e14..1441ce26 100644 --- a/test/govspeak_test.rb +++ b/test/govspeak_test.rb @@ -837,6 +837,27 @@ class GovspeakTest < Minitest::Test end end + test "should remove quotes surrounding a blockquote" do + govspeak = %Q{ +He said: + +> "I'm not sure what you mean!" + +Or so we thought.} + + given_govspeak(govspeak) do + assert_html_output %| +

He said:

+ +
+

I’m not sure what you mean!

+
+ +

Or so we thought.

+ | + end + end + test "should add class to last paragraph of blockquote" do govspeak = " > first line