diff --git a/ext/dtext/dtext.cpp.rl b/ext/dtext/dtext.cpp.rl index da96c02..34407d8 100644 --- a/ext/dtext/dtext.cpp.rl +++ b/ext/dtext/dtext.cpp.rl @@ -838,7 +838,7 @@ void StateMachine::append_section(const std::string_view summary, bool initially if (!summary.empty()) { append_html_escaped(summary); } - append_block(""); + append_block("
', "[quote][quote]foo[/quote]") assert_parse('foo
', "[quote][spoiler]foo[/quote]") assert_parse('foo
', "[quote][code]foo[/quote]") - assert_parse('foo[/quote]
', "[quote][section]foo[/quote]") + assert_parse('foo
', "[quote][section]foo[/quote]") assert_parse('foo
', "[quote][table][td]foo[/quote]") assert_parse('
foo
', "[quote]* foo[/quote]") assert_parse('
- foo
', "[quote]h1. foo[/quote]") @@ -258,13 +258,13 @@ test2[/ltable] def test_quote_blocks_nested_spoiler assert_parse("foo
", "[quote]\na\n[spoiler]blah[/spoiler]\nc[/quote]") assert_parse("a
blah
c
", "[quote]\na\n\n[spoiler]blah[/spoiler]\n\nc[/quote]") - assert_parse('a
blah
c
", "[quote]\na\n[section]\nb\n[/section]\nc\n[/quote]") + assert_parse("a
b
c
", "[quote]\na\n[section]\nb\n[/section]\nc\n[/quote]") end def test_code @@ -402,10 +402,10 @@ test2[/ltable] # assert_parse('a
b
c
a
d
', "a\n[spoilers]\n* b\n* c\n[/spoilers]\nd") assert_parse('a
- b
- c
d
', "a\n[quote]\n* b\n* c\n[/quote]\nd") - assert_parse('a
d
', "a\n[section]\n* b\n* c\n[/section]\nd") + assert_parse('a
d
', "a\n[section]\n* b\n* c\n[/section]\nd") assert_parse('a
', "a\n[quote]\n* b\n* c\n\nd") - assert_parse('
- b
- c
d
a
d
a
d
*
', "*") assert_parse('*a
', "*a") @@ -508,48 +508,48 @@ test2[/ltable] end def test_expand - assert_parse("hello world
hello world
inline foo
blah blah
inline foo
blah blah
inline foo
blah blah
inline foo
blah blah
inline foo
blah blah
inline foo
blah blah
inline foo
blah blah
inline foo
blah blah
inline
blah blah
inline
blah blah
test
test
blah
', "[section]\ntest\n[/section] blah") - assert_parse('test
blah
', "[section]\ntest\n[/section] \nblah") - assert_parse('test
blah
', "[section]\ntest\n[/section]\nblah") - assert_parse('test
blah
', "[section]\ntest\n[/section]\n blah") # XXX should ignore space + assert_parse('test
test
blah
', "[section]\ntest\n[/section] blah") + assert_parse('test
blah
', "[section]\ntest\n[/section] \nblah") + assert_parse('test
blah
', "[section]\ntest\n[/section]\nblah") + assert_parse('test
blah
', "[section]\ntest\n[/section]\n blah") # XXX should ignore space assert_parse("[/section]
", "[/section]") assert_parse("foo [/section] bar
", "foo [/section] bar") assert_parse('test
[/section] blah
test
[/section]
test
test
blah
test
test
blah
a
a
blah blah
blah blah
inline foo
blah blah
inline foo
blah blah
inline foo
blah blah
inline foo
blah blah
hello\n
hello\n
c
", "[section]\n* a\n* b\n[/section]\nc") + assert_parse("c
", "[section]\n* a\n* b\n[/section]\nc") end def test_inline_mode