diff --git a/lib/govspeak.rb b/lib/govspeak.rb index 8d36123..7b7d7f6 100644 --- a/lib/govspeak.rb +++ b/lib/govspeak.rb @@ -296,7 +296,7 @@ def render_image(image) extension("example", surrounded_by("$E")) do |body| <<~BODY
- #{body.strip.gsub(/\A^\|/, "\n|").gsub(/\|$\Z/, "|\n")} + #{body.strip.gsub(/\A^\|/, "\n|").gsub(/\|$\Z/, "|\n")}
BODY end diff --git a/test/govspeak_test.rb b/test/govspeak_test.rb index ddc344c..c66cbdc 100644 --- a/test/govspeak_test.rb +++ b/test/govspeak_test.rb @@ -1334,6 +1334,22 @@ class GovspeakTest < Minitest::Test ) end + test_given_govspeak " + $E + + ### A heading within an example + + Some example content + + $E" do + assert_html_output %( +
+

A heading within an example

+ +

Some example content

+
) + end + test_given_govspeak " $LegislativeList * 1. Item 1[^1] with an ACRONYM