[ruby/rdoc] Fix formatting blockquote in verbatim
Reported at https://github.com/ruby/rdoc/pull/907#discussion_r932505816 https://github.com/ruby/rdoc/commit/86384ac7f9
This commit is contained in:
parent
0d68286be9
commit
f29f1d22c3
@ -287,6 +287,8 @@ class RDoc::Markup::Parser
|
|||||||
line << ' ' * indent
|
line << ' ' * indent
|
||||||
when :BREAK, :TEXT then
|
when :BREAK, :TEXT then
|
||||||
line << data
|
line << data
|
||||||
|
when :BLOCKQUOTE then
|
||||||
|
line << '>>>'
|
||||||
else # *LIST_TOKENS
|
else # *LIST_TOKENS
|
||||||
list_marker = case type
|
list_marker = case type
|
||||||
when :BULLET then data
|
when :BULLET then data
|
||||||
|
@ -812,6 +812,17 @@ EXPECTED
|
|||||||
assert_equal expected, @m.convert(str, @to)
|
assert_equal expected, @m.convert(str, @to)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_block_quote_in_verbatim
|
||||||
|
str = "BlockQuote\n >>>\n"
|
||||||
|
|
||||||
|
expected = <<-EXPECTED
|
||||||
|
<p>BlockQuote</p>
|
||||||
|
<pre>>>></pre>
|
||||||
|
EXPECTED
|
||||||
|
|
||||||
|
assert_equal expected, @m.convert(str, @to).gsub(/^\n/, "")
|
||||||
|
end
|
||||||
|
|
||||||
def test_parseable_eh
|
def test_parseable_eh
|
||||||
valid_syntax = [
|
valid_syntax = [
|
||||||
'def x() end',
|
'def x() end',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user