angular/packages/compiler-cli
Andrew Scott 2b7553db6f fix(compiler): compute correct offsets when interpolations have HTML entities (#44811)
When parsing interpolations, the input string is _decoded_ from what was
in the orginal template. This means that we cannot soley rely on the input
string to compute source spans because it does not necessarily reflect
the exact content of the original template. Specifically, when there is
an HTML entity (i.e. ` `), this will show up in its decoded form
when processing the interpolation (' '). We need to compute offsets
using the original _encoded_ string.

Note that this problem only surfaces in the splitting of interpolations.
The spans to this point have already been tracked accurately. For
example, given the template `&nbsp;<div></div>`, the source span for the
`div` is already correctly determined to be 6. Only when we encounter
interpolations with many parts do we run into situations where we need
to compute new spans for the individual parts of the interpolation.

PR Close #44811
2022-03-08 10:23:07 -08:00
..
integrationtest refactor(core): drop all .ngfactory and .ngsummary imports (#44957) 2022-02-07 15:31:49 -08:00
linker refactor(localize): update version of Babel (#44931) 2022-02-24 21:42:54 +00:00
ngcc refactor(compiler): remove usages of deprecated AST creation functions (#45134) 2022-02-22 10:22:47 -08:00
private refactor(localize): update version of Babel (#44931) 2022-02-24 21:42:54 +00:00
src fix(compiler): compute correct offsets when interpolations have HTML entities (#44811) 2022-03-08 10:23:07 -08:00
test test(compiler): fix deprecation warning (#45285) 2022-03-07 11:36:47 -08:00
BUILD.bazel refactor(compiler-cli): remove unused canonical-path dependency (#44918) 2022-01-31 21:39:53 +00:00
esbuild.config.js refactor: setup bundling for @angular/compiler-cli package (#43431) 2021-10-01 18:28:42 +00:00
import_meta_url.d.ts refactor(compiler-cli): do not use __filename or __dirname global for ESM compatibility (#43431) 2021-10-01 18:28:45 +00:00
index.ts build: switch all instances from ng_rollup_bundle to app_bundle (#44490) 2022-01-04 12:14:14 -08:00
package.json build: update dependency magic-string to v0.26.1 (#45247) 2022-03-07 14:29:45 -08:00
tsconfig-build.json refactor(compiler-cli): dismantle View Engine implementation of ngc (#44269) 2021-12-01 10:36:30 -08:00
tsconfig.json build: update tsconfigs to use ES2020 as target and module (#43431) 2021-10-01 18:28:42 +00:00