File tree Expand file tree Collapse file tree
crates/engine_spx2html/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -424,6 +424,8 @@ impl EmittingState {
424424 match special {
425425 Special :: AutoStartParagraph => {
426426 if self . cur_elstate ( ) . do_auto_tags {
427+ self . close_automatics ( ) ;
428+
427429 // Why are we using <div>s instead of <p>? As the HTML spec
428430 // emphasizes, <p> tags are structural, not semantic. You cannot
429431 // put tags like <ul> or <div> inside <p> -- they automatically
@@ -452,6 +454,7 @@ impl EmittingState {
452454 if let Some ( canvas) = self . current_canvas . as_mut ( ) {
453455 canvas. depth += 1 ;
454456 } else {
457+ self . close_automatics ( ) ;
455458 self . current_canvas = Some ( CanvasState :: new ( kind, x, y) ) ;
456459 }
457460 Ok ( ( ) )
@@ -474,6 +477,7 @@ impl EmittingState {
474477 }
475478
476479 Special :: ManualFlexibleStart ( spec) => {
480+ self . close_automatics ( ) ;
477481 self . handle_flexible_start_tag ( x, y, spec, common)
478482 }
479483
You can’t perform that action at this time.
0 commit comments