Skip to content

Commit 86384ac

Browse files
committed
Fix formatting blockquote in verbatim
Reported at #907 (comment)
1 parent 825be7e commit 86384ac

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

lib/rdoc/markup/parser.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ def build_verbatim margin
287287
line << ' ' * indent
288288
when :BREAK, :TEXT then
289289
line << data
290+
when :BLOCKQUOTE then
291+
line << '>>>'
290292
else # *LIST_TOKENS
291293
list_marker = case type
292294
when :BULLET then data

test/rdoc/test_rdoc_markup_to_html.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,17 @@ def test_list_verbatim_2
812812
assert_equal expected, @m.convert(str, @to)
813813
end
814814

815+
def test_block_quote_in_verbatim
816+
str = "BlockQuote\n >>>\n"
817+
818+
expected = <<-EXPECTED
819+
<p>BlockQuote</p>
820+
<pre>&gt;&gt;&gt;</pre>
821+
EXPECTED
822+
823+
assert_equal expected, @m.convert(str, @to).gsub(/^\n/, "")
824+
end
825+
815826
def test_parseable_eh
816827
valid_syntax = [
817828
'def x() end',

0 commit comments

Comments
 (0)