зеркало из https://github.com/github/ruby.git
[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:
Родитель
0d68286be9
Коммит
f29f1d22c3
|
@ -287,6 +287,8 @@ class RDoc::Markup::Parser
|
|||
line << ' ' * indent
|
||||
when :BREAK, :TEXT then
|
||||
line << data
|
||||
when :BLOCKQUOTE then
|
||||
line << '>>>'
|
||||
else # *LIST_TOKENS
|
||||
list_marker = case type
|
||||
when :BULLET then data
|
||||
|
|
|
@ -812,6 +812,17 @@ EXPECTED
|
|||
assert_equal expected, @m.convert(str, @to)
|
||||
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
|
||||
valid_syntax = [
|
||||
'def x() end',
|
||||
|
|
Загрузка…
Ссылка в новой задаче