@@ -723,7 +723,7 @@ impl Syntax {
723 let mut layers = self
723 let mut layers = self
726− .flat_map(|(_, layer)| {
726+ .filter_map(|(_, layer)| {
727 // Reuse a cursor from the pool if available.
727 // Reuse a cursor from the pool if available.
728 let mut cursor = PARSER.with(|ts_parser| {
728 let mut cursor = PARSER.with(|ts_parser| {
729 let highlighter = &mut ts_parser.borrow_mut();
729 let highlighter = &mut ts_parser.borrow_mut();