Skip to content

Commit 3e36a99

Browse files
committed
Add test_accept_verbatim_nl_after_backslash
1 parent 6b88ae0 commit 3e36a99

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/test_rdoc_markup_to_html.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,22 @@ def test_accept_verbatim_parseable_error
451451
assert_equal expected, @to.res.join
452452
end
453453

454+
def test_accept_nl_after_backslash
455+
verb = @RM::Verbatim.new("a = 1 if first_flag_var and \\\n", " this_is_flag_var\n")
456+
457+
@to.start_accepting
458+
@to.accept_verbatim verb
459+
460+
expected = <<-EXPECTED
461+
462+
<pre class="ruby"><span class="ruby-identifier">a</span> = <span class="ruby-value">1</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">first_flag_var</span> <span class="ruby-keyword">and</span> \\
463+
<span class="ruby-identifier">this_is_flag_var</span>
464+
</pre>
465+
EXPECTED
466+
467+
assert_equal expected, @to.res.join
468+
end
469+
454470
def test_accept_verbatim_pipe
455471
@options.pipe = true
456472

0 commit comments

Comments
 (0)