File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -595,6 +595,23 @@ outer third line"#,
595595 . unwrap( )
596596 ) ;
597597
598+ hb. register_template_string (
599+ "t4" ,
600+ r#"{{#*inline "thepartial"}}
601+ inner first line
602+ inner second line
603+ {{/inline}}
604+ {{~> thepartial}}
605+ outer third line"# ,
606+ )
607+ . unwrap ( ) ;
608+ assert_eq ! (
609+ r#" inner first line
610+ inner second line
611+ outer third line"# ,
612+ hb. render( "t4" , & ( ) ) . unwrap( )
613+ ) ;
614+
598615 let mut hb2 = Registry :: new ( ) ;
599616 hb2. set_prevent_indent ( true ) ;
600617
Original file line number Diff line number Diff line change @@ -728,7 +728,10 @@ impl Template {
728728
729729 // indent for partial expression >
730730 let mut indent = None ;
731- if rule == Rule :: partial_expression && !options. prevent_indent {
731+ if rule == Rule :: partial_expression
732+ && !options. prevent_indent
733+ && !exp. omit_pre_ws
734+ {
732735 indent = support:: str:: find_trailing_whitespace_chars (
733736 & source[ ..span. start ( ) ] ,
734737 ) ;
You can’t perform that action at this time.
0 commit comments