angular/packages/compiler/test/render3
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
..
util refactor(compiler): account for new assignment AST (#61682) 2025-06-03 11:08:50 -04:00
view refactor(compiler): element references not resolved when selectorless matcher is passed in (#61100) 2025-05-05 14:38:13 -07:00
BUILD.bazel build: remove ts_project_interop infrastructure (#62908) 2025-07-31 09:12:58 +00:00
r3_ast_absolute_span_spec.ts refactor(compiler): convert scripts within packages/compiler to relative imports (#60625) 2025-04-01 11:57:53 +00:00
r3_ast_spans_spec.ts fix(compiler): incorrect spans for AST inside input value with leading space (#63082) 2025-08-11 11:57:05 -07:00
r3_template_transform_spec.ts feat(core): support as aliases on else if blocks (#63047) 2025-08-08 08:43:00 -07:00
README.md feat(compiler): implement "enableIvy" compiler option (#21427) 2018-01-18 18:22:44 -06:00
style_parser_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00

Tests in this directory are excluded from running in the browser and only run in node.