angular/packages/compiler-cli/test/ngtsc
Pete Bacon Darwin feba4d2719 fix(compiler): include leading whitespace in source-spans of i18n messages (#43132)
Previously, the way templates were tokenized meant that we lost information
about the location of interpolations if the template contained encoded HTML
entities. This meant that the mapping back to the source interpolated strings
could be offset incorrectly.

Also, the source-span assigned to an i18n message did not include leading
whitespace. This confused the output source-mappings so that the first text
nodes of the message stopped at the first non-whitespace character.

This commit makes use of the previous refactorings, where more fine grain
information was provided in text tokens, to enable the parser to identify
the location of the interpolations in the original source more accurately.

Fixes #41034

PR Close #43132
2021-09-16 18:15:51 +00:00
..
BUILD.bazel test(compiler-cli): load type declarations from fake_common (#41995) 2021-06-03 11:33:26 -07:00
component_indexing_spec.ts refactor(compiler-cli): update to use new file-system interfaces (#40281) 2021-01-08 09:34:44 -08:00
env.ts refactor(compiler-cli): ensure compatibility with noImplicitOverride (#42512) 2021-07-12 13:11:14 -07:00
extended_template_diagnostics_spec.ts test(compiler-cli): add tests for NullishCoalescingNotNullableCheck (#43232) 2021-08-26 16:36:32 -07:00
incremental_error_spec.ts perf(compiler-cli): detect semantic changes and their effect on an incremental rebuild (#40947) 2021-03-08 08:41:19 -08:00
incremental_semantic_changes_spec.ts refactor(compiler-cli): Adjust generated TCB when checkTypeOfPipes is false (#40523) 2021-05-06 17:54:14 -04:00
incremental_spec.ts fix(compiler-cli): inline type checking instructions no longer prevent incremental reuse (#42759) 2021-07-07 15:17:25 -07:00
incremental_typecheck_spec.ts perf(compiler-cli): detect semantic changes and their effect on an incremental rebuild (#40947) 2021-03-08 08:41:19 -08:00
monorepo_spec.ts test(compiler-cli): move testing utils to separate package (#39594) 2020-11-17 11:59:56 -08:00
ngtsc_spec.ts fix(compiler-cli): use correct module import for types behind a forwardRef (#42887) 2021-07-20 11:56:05 -07:00
scope_spec.ts refactor(core): rename ...WithMeta types to ...Declaration and alias to unknown (#41119) 2021-03-22 08:57:18 -07:00
sourcemap_utils.ts fix(compiler-cli): update type castings for JSON.parse usage (#40710) 2021-02-09 10:48:43 -08:00
template_mapping_spec.ts fix(compiler): include leading whitespace in source-spans of i18n messages (#43132) 2021-09-16 18:15:51 +00:00
template_typecheck_spec.ts refactor(compiler-cli): move getSourceCodeForDiagnostic to utils (#42984) 2021-08-10 15:55:49 -07:00
xi18n_spec.ts refactor(compiler-cli): support xi18n in ngtsc (#42485) 2021-06-21 16:50:28 +00:00