angular/packages/compiler/test
Kristiyan Kostadinov d17555a7c6 fix(compiler): incorrect spans for AST inside input value with leading space (#63082)
When parsing expressions inside a bound attribute, we offset all of its spans by an `absoluteOffset` in order to get the right spans in the source file. The offset was incorrect when parsing an attribute with leading spaces during the construction of the Ivy AST, because of the combination of:
1. We were setting the offset by looking at `valueSpan.start`.
2. The Ivy parser sets `leadingTriviaChars: [' ', '\n']` which means that spaces and new lines will be ignored in the `sourceSpan.start`.

These changes resolve the issue by using `valueSpan.fullStart` which includes the leading spaces.

Fixes #63069.

PR Close #63082
2025-08-11 11:57:05 -07:00
..
expression_parser build: remove ts_project_interop infrastructure (#62908) 2025-07-31 09:12:58 +00:00
i18n build: migrate packages/compiler to ts_project (#61566) 2025-05-29 14:39:10 -04:00
ml_parser build: remove ts_project_interop infrastructure (#62908) 2025-07-31 09:12:58 +00:00
output refactor(compiler): remove unused code (#61668) 2025-05-26 12:21:09 +00:00
render3 fix(compiler): incorrect spans for AST inside input value with leading space (#63082) 2025-08-11 11:57:05 -07:00
schema build: move private testing helpers outside platform-browser/testing (#61472) 2025-05-20 10:00:43 +00:00
selector build: remove ts_project_interop infrastructure (#62908) 2025-07-31 09:12:58 +00:00
shadow_css refactor(compiler): convert scripts within packages/compiler to relative imports (#60625) 2025-04-01 11:57:53 +00:00
BUILD.bazel build: remove ts_project_interop infrastructure (#62908) 2025-07-31 09:12:58 +00:00
compiler_facade_interface_spec.ts docs: set syntax highlighting of code examples MD code blocks (#59026) 2024-12-04 17:30:28 +01:00
integration_spec.ts build: migrate packages/compiler to ts_project (#61566) 2025-05-29 14:39:10 -04:00
security_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
style_url_resolver_spec.ts refactor(compiler): convert scripts within packages/compiler to relative imports (#60625) 2025-04-01 11:57:53 +00:00
util_spec.ts refactor(compiler): remove unused code (#61668) 2025-05-26 12:21:09 +00:00