@@ -1136,6 +1136,7 @@ impl Syntax {
1136 RopeProvider(source_slice),
1136 RopeProvider(source_slice),
1138 let mut injections = Vec::new();
1138 let mut injections = Vec::new();
1139+ let mut last_injection_end = 0;
1139 for mat in matches {
1140 for mat in matches {
1140 let (injection_capture, content_node, included_children) = layer
1141 let (injection_capture, content_node, included_children) = layer
@@ -1155,6 +1156,10 @@ impl Syntax {
1155 intersect_ranges(&layer.ranges, &[content_node], included_children);
1156 intersect_ranges(&layer.ranges, &[content_node], included_children);
1157 if !ranges.is_empty() {
1158 if !ranges.is_empty() {
1159+ if content_node.start_byte() < last_injection_end {
1162+ last_injection_end = content_node.end_byte();
1158 injections.push((config, ranges));
1163 injections.push((config, ranges));