File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -239,3 +239,25 @@ fn html_blocks() {
239239fn code_block_fenced_with_indent ( ) {
240240 BookTest :: from_dir ( "rendering/code_blocks_fenced_with_indent" ) . check_all_main_files ( ) ;
241241}
242+
243+ // Unclosed HTML tags.
244+ //
245+ // Note that the HTML parsing algorithm is much more complicated than what
246+ // this is checking.
247+ #[ test]
248+ fn unclosed_html_tags ( ) {
249+ BookTest :: init ( |_| { } )
250+ . change_file ( "src/chapter_1.md" , "<div>x<span>foo<i>xyz" )
251+ . run ( "build" , |cmd| {
252+ cmd. expect_stderr ( str![ [ r#"
253+ INFO Book building has started
254+ INFO Running the html backend
255+ INFO HTML book written to `[ROOT]/book`
256+
257+ "# ] ] ) ;
258+ } )
259+ . check_main_file (
260+ "book/chapter_1.html" ,
261+ str![ "<div>x<span>foo<i>xyz</i></span></div>" ] ,
262+ ) ;
263+ }
You can’t perform that action at this time.
0 commit comments