diff --git a/lib/review/markdownbuilder.rb b/lib/review/markdownbuilder.rb index b777bac1a..228da045f 100644 --- a/lib/review/markdownbuilder.rb +++ b/lib/review/markdownbuilder.rb @@ -99,6 +99,22 @@ def ol_end blank end + def dl_begin + puts '
' + end + + def dt(line) + puts "
#{line}
" + end + + def dd(lines) + puts "
#{lines.join}
" + end + + def dl_end + puts '
' + end + def emlist(lines, caption = nil, lang = nil) blank if caption diff --git a/test/test_markdownbuilder.rb b/test/test_markdownbuilder.rb index d49ae020a..e4b6aba55 100644 --- a/test/test_markdownbuilder.rb +++ b/test/test_markdownbuilder.rb @@ -62,6 +62,23 @@ def test_cmd assert_equal "```shell-session\nlineA\nlineB\n```\n", actual end + + def test_dlist + actual = compile_block(": foo\n foo.\n bar.\n") + assert_equal %Q|
\n
foo
\n
foo.bar.
\n
\n|, actual + end + + def test_dlist_with_bracket + actual = compile_block(": foo[bar]\n foo.\n bar.\n") + assert_equal %Q|
\n
foo[bar]
\n
foo.bar.
\n
\n|, actual + end + + def test_dlist_with_comment + source = ": title\n body\n\#@ comment\n\#@ comment\n: title2\n body2\n" + actual = compile_block(source) + assert_equal %Q|
\n
title
\n
body
\n
title2
\n
body2
\n
\n|, actual + end + def test_list actual = compile_block(<<-EOS) //list[name][caption]{