Ben Kunkle
a40ee74a1f
Improve handling of injection.combined injections in SyntaxSnapshot::layers_for_range ( #32145 )
...
Closes #27596
The problem in this case was incorrect identification of which language
(layer) contains the selection.
Language layer selection incorrectly assumed that the deepest
`SyntaxLayer` containing a range was the most specific. This worked for
Markdown (base document + injected subtrees) but failed for PHP, where
`injection.combined` injections are used to make HTML logically function
as the base layer, despite being at a greater depth in the layer stack.
This caused HTML to be incorrectly identified as the most specific
language for PHP ranges.
The solution is to track included sub-ranges for syntax layers and
filter out layers that don't contain a sub-range covering the desired
range. The top-level layer is never filtered to ensure gaps between
sibling nodes always have a fallback language, as the top-level layer is
likely more correct than the default language settings.
Release Notes:
- Fixed an issue in PHP where PHP language settings would be
occasionally overridden by HTML language settings
2025-06-06 10:47:28 -04:00
..
2025-05-29 01:58:40 +00:00
2025-06-06 15:32:06 +02:00
2025-06-06 12:05:27 +00:00
2025-05-22 21:00:54 +00:00
2025-05-16 05:04:36 -04:00
2025-05-20 23:06:07 +00:00
2025-06-06 15:32:06 +02:00
2025-05-21 09:27:54 +00:00
2025-05-26 11:48:50 -04:00
2025-06-06 12:05:27 +00:00
2025-06-06 09:39:35 +00:00
2025-05-26 21:20:41 -03:00
2025-05-28 11:51:21 -04:00
2025-05-20 23:06:07 +00:00
2025-05-30 08:29:52 +00:00
2025-06-04 10:41:12 +03:00
2025-05-30 08:32:54 -07:00
2025-05-26 11:48:50 -04:00
2025-05-26 23:04:31 -04:00
2025-06-04 16:56:33 +00:00
2025-05-20 23:06:07 +00:00
2025-05-26 23:04:31 -04:00
2025-05-04 08:28:39 +00:00
2025-06-06 16:18:05 +03:00
2025-06-05 19:15:06 +00:00
2025-06-04 19:18:12 +00:00
2025-06-05 12:59:22 +00:00
2025-05-26 10:29:45 +02:00
2025-06-05 19:42:52 +00:00
2025-06-04 01:37:25 +02:00
2025-06-04 01:37:25 +02:00
2025-05-20 00:20:00 +00:00
2025-05-22 07:24:46 -04:00
2025-05-14 11:15:27 +02:00
2025-06-05 19:15:06 +00:00
2025-05-20 23:06:07 +00:00
2025-06-06 16:18:05 +03:00
2025-06-04 19:18:12 +00:00
2025-06-06 14:29:59 +00:00
2025-06-06 12:05:27 +00:00
2025-05-26 16:06:38 +02:00
2025-05-26 16:06:38 +02:00
2025-05-20 23:06:07 +00:00
2025-06-02 22:19:09 +00:00
2025-06-03 20:35:25 +00:00
2025-05-17 16:42:45 +00:00
2025-05-23 14:53:53 +00:00
2025-06-03 20:35:25 +00:00
2025-06-04 19:54:24 +02:00
2025-05-12 14:43:14 +00:00
2025-06-03 12:23:01 -04:00
2025-06-03 12:23:01 -04:00
2025-06-05 17:12:17 +00:00
2025-06-03 09:41:45 +02:00
2025-06-05 19:30:34 +00:00
2025-06-06 07:31:45 +00:00
2025-05-26 17:43:57 +00:00
2025-05-20 23:06:07 +00:00
2025-06-03 15:20:25 -03:00
2025-06-03 13:18:29 +02:00
2025-05-20 23:06:07 +00:00
2025-05-20 23:06:07 +00:00
2025-05-27 21:52:42 +00:00
2025-06-05 19:15:06 +00:00
2025-05-20 23:06:07 +00:00
2025-05-17 16:42:45 +00:00
2025-05-17 16:42:45 +00:00
2025-06-06 10:47:28 -04:00
2025-05-08 14:01:39 +02:00
2025-06-04 14:07:01 +00:00
2025-06-06 12:35:22 +03:00
2025-05-20 23:06:07 +00:00
2025-06-03 02:12:58 +00:00
2025-06-06 08:31:59 -04:00
2025-05-20 23:06:07 +00:00
2025-05-20 23:06:07 +00:00
2025-06-04 14:07:01 +00:00
2025-06-05 19:42:52 +00:00
2025-05-29 21:41:15 +00:00
2025-05-30 08:29:52 +00:00
2025-05-20 23:06:07 +00:00
2025-04-29 21:58:45 -03:00
2025-05-30 08:10:12 -03:00
2025-05-22 14:22:35 -04:00
2025-06-06 11:06:42 +00:00
2025-06-05 23:35:43 +00:00
2025-06-06 06:23:09 +00:00
2025-06-04 14:07:01 +00:00
2025-05-26 11:46:35 +00:00
2025-06-03 15:59:46 +00:00
2025-05-26 23:04:31 -04:00
2025-05-26 23:04:31 -04:00
2025-06-02 21:24:08 +00:00
2025-05-29 12:55:47 +00:00
2025-06-05 19:42:52 +00:00
2025-06-06 16:18:05 +03:00
2025-06-05 03:53:59 +05:30
2025-05-26 23:04:31 -04:00
2025-05-20 23:06:07 +00:00
2025-06-06 16:18:05 +03:00
2025-06-05 07:09:09 +00:00
2025-05-26 17:43:57 +00:00
2025-05-23 14:53:53 +00:00
2025-05-27 16:56:27 +00:00
2025-06-04 19:54:24 +02:00
2025-06-02 16:29:06 +00:00
2025-05-20 23:06:07 +00:00
2025-05-26 11:48:50 -04:00
2025-05-26 11:48:50 -04:00
2025-06-03 14:59:17 -03:00
2025-05-26 23:04:31 -04:00
2025-05-29 20:43:12 +00:00
2025-05-20 23:06:07 +00:00
2025-06-03 12:23:01 -04:00
2025-06-04 17:29:08 +00:00
2025-05-20 23:06:07 +00:00
2025-05-26 23:04:31 -04:00
2025-05-26 13:44:09 +00:00
2025-05-20 23:06:07 +00:00
2025-05-16 17:35:44 +02:00
2025-05-20 23:06:07 +00:00
2025-05-01 17:37:43 +02:00
2025-05-26 11:48:50 -04:00
2025-05-23 20:45:32 +00:00
2025-05-29 16:09:07 +00:00
2025-05-30 14:32:59 +02:00
2025-06-05 13:25:51 -04:00
2025-06-06 08:08:20 -04:00
2025-06-03 17:43:06 -04:00
2025-06-04 02:37:27 +00:00
2025-05-26 18:23:41 +00:00
2025-05-26 18:23:41 +00:00
2025-06-04 17:29:08 +00:00
2025-05-06 10:18:48 +00:00
2025-06-05 07:09:09 +00:00
2025-06-02 16:29:06 +00:00
2025-06-06 06:24:59 +00:00
2025-05-14 23:29:11 +02:00
2025-05-23 19:31:25 +00:00
2025-05-30 15:26:27 +00:00
2025-06-04 02:37:27 +00:00
2025-05-01 19:24:14 +00:00
2025-06-05 18:10:22 -07:00
2025-05-20 23:06:07 +00:00
2025-05-29 15:20:58 -04:00
2025-06-06 05:09:48 -04:00
2025-06-03 22:30:59 +00:00
2025-06-05 19:38:19 +08:00
2025-06-06 06:23:09 +00:00
2025-05-26 11:48:50 -04:00
2025-06-06 00:49:30 -06:00