angular-cn/packages/language-service/ivy/test/legacy
JoostK c18c7e23ec fix(compiler): exclude trailing whitespace from element source spans (#40513)
If the template parse option `leadingTriviaChars` is configured to
consider whitespace as trivia, any trailing whitespace of an element
would be considered as leading trivia of the subsequent element, such
that its `start` span would start _after_ the whitespace. This means
that the start span cannot be used to mark the end of the current
element, as its trailing whitespace would then be included in its span.
Instead, the full start of the subsequent element should be used.

To harden the tests that for the Ivy parser, the test utility `parseR3`
has been adjusted to use the same configuration for `leadingTriviaChars`
as would be the case in its production counterpart `parseTemplate`. This
uncovered another bug in offset handling of the interpolation parser,
where the absolute offset was computed from the start source span
(which excludes leading trivia) whereas the interpolation expression
would include the leading trivia. As such, the absolute offset now also
uses the full start span.

Fixes #39148

PR Close #40513
2021-01-28 08:53:02 -08:00
..
BUILD.bazel feat(language-service): Add diagnostics to suggest turning on strict mode (#40423) 2021-01-25 14:17:31 -08:00
adapters_spec.ts test(language-service): add renamed, deleted test file (#39742) 2020-11-18 11:11:14 -08:00
compiler_factory_spec.ts test(language-service): move existing tests to legacy directory (#39594) 2020-11-17 11:59:56 -08:00
daignostic_spec.ts test(language-service): convert ivy diagnostics tests from legacy (#39957) 2020-12-04 10:16:43 -08:00
definitions_spec.ts fix(language-service): Support 'go to definition' for two-way bindings (#40185) 2021-01-07 13:18:38 -08:00
language_service_spec.ts feat(language-service): Add diagnostics to suggest turning on strict mode (#40423) 2021-01-25 14:17:31 -08:00
mock_host.ts feat(language-service): Add diagnostics to suggest turning on strict mode (#40423) 2021-01-25 14:17:31 -08:00
mock_host_spec.ts test(language-service): move existing tests to legacy directory (#39594) 2020-11-17 11:59:56 -08:00
template_target_spec.ts fix(compiler): exclude trailing whitespace from element source spans (#40513) 2021-01-28 08:53:02 -08:00
test_utils.ts test(language-service): move existing tests to legacy directory (#39594) 2020-11-17 11:59:56 -08:00
ts_plugin_spec.ts fix(language-service): return all typecheck files via getExternalFiles (#40162) 2021-01-06 11:34:15 -08:00
type_definitions_spec.ts refactor(compiler-cli): Return addEventListener symbol for native output bindings (#39312) 2020-12-08 16:18:24 -08:00