6
6
//! Use the `render_with_highlighting` to highlight some rust code.
7
7
8
8
use crate :: clean:: PrimitiveType ;
9
- use crate :: html:: escape:: Escape ;
9
+ use crate :: html:: escape:: EscapeBodyText ;
10
10
use crate :: html:: render:: { Context , LinkFromSrc } ;
11
11
12
12
use std:: collections:: VecDeque ;
@@ -189,7 +189,7 @@ impl<'a, 'tcx, F: Write> TokenHandler<'a, 'tcx, F> {
189
189
&& can_merge ( current_class, Some ( * parent_class) , "" )
190
190
{
191
191
for ( text, class) in self . pending_elems . iter ( ) {
192
- string ( self . out , Escape ( text) , * class, & self . href_context , false ) ;
192
+ string ( self . out , EscapeBodyText ( text) , * class, & self . href_context , false ) ;
193
193
}
194
194
} else {
195
195
// We only want to "open" the tag ourselves if we have more than one pending and if the
@@ -202,7 +202,7 @@ impl<'a, 'tcx, F: Write> TokenHandler<'a, 'tcx, F> {
202
202
None
203
203
} ;
204
204
for ( text, class) in self . pending_elems . iter ( ) {
205
- string ( self . out , Escape ( text) , * class, & self . href_context , close_tag. is_none ( ) ) ;
205
+ string ( self . out , EscapeBodyText ( text) , * class, & self . href_context , close_tag. is_none ( ) ) ;
206
206
}
207
207
if let Some ( close_tag) = close_tag {
208
208
exit_span ( self . out , close_tag) ;
0 commit comments