+ [lain@navi ~/.local/src/git/bbcode]$ hacking on the [b]BBCode[/b] parser using [asdf]as the version manager[/asdf]
+ [/code]
"""
{:ok, output} = BBCode.to_html(data)
assert output ==
- "<blockquote>A multiline quote.<br>This is the second line.<br></blockquote><ul><li>a</li><li>b</li><li>c</li></ul><strong>bold</strong><br><em>italic</em><br><u>underline</u><br><del>strikethrough</del><br><br><a href=\"http://example.com\">a link</a><br><br>@kaniini (a mention)<br>"
+ "<blockquote>A multiline quote.<br>This is the second line.<br></blockquote><ul><li>a</li><li>b</li><li>c</li></ul><strong>bold</strong><br><em>italic</em><br><u>underline</u><br><del>strikethrough</del><br><br><a href=\"http://example.com\">a link</a><br><br>@kaniini (a mention)<br><br><pre>[lain@navi ~/.local/src/git/bbcode]$ hacking on the <strong>BBCode</strong> parser using [asdf]as the version manager[/asdf]<br></pre>"
+ end
+ end
+
+ describe "unknown tags" do
+ test "it continues when tag is encountered" do
+ assert {:ok, "<pre>[asdf] valid input</pre> and <strong>bold</strong> text"} =
+ BBCode.to_html("[code][asdf] valid input[/code] and [b]bold[/b] text")
+ end
+
+ test "it continues when closing tag is encountered" do