File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -237,15 +237,23 @@ impl<'a> fmt::Display for WhereClause<'a> {
237
237
clause. push ( ',' ) ;
238
238
}
239
239
}
240
+
241
+ if end_newline {
242
+ //add a space so stripping <br> tags and breaking spaces still renders properly
243
+ if f. alternate ( ) {
244
+ clause. push ( ' ' ) ;
245
+ } else {
246
+ clause. push_str ( " " ) ;
247
+ }
248
+ }
249
+
240
250
if !f. alternate ( ) {
241
251
clause. push_str ( "</span>" ) ;
242
252
let padding = repeat ( " " ) . take ( indent + 4 ) . collect :: < String > ( ) ;
243
253
clause = clause. replace ( "<br>" , & format ! ( "<br>{}" , padding) ) ;
244
254
clause. insert_str ( 0 , & repeat ( " " ) . take ( indent. saturating_sub ( 1 ) )
245
255
. collect :: < String > ( ) ) ;
246
- if end_newline {
247
- clause. push ( ' ' ) ;
248
- } else {
256
+ if !end_newline {
249
257
clause. insert_str ( 0 , "<br>" ) ;
250
258
}
251
259
}
You can’t perform that action at this time.
0 commit comments