angular/packages/compiler/test/ml_parser
Pawel Kozlowski f2dc32e5c7 fix(core): don't wrap <tr> and <col> elements into a required parent (#29219)
BREAKING CHANGE:

Certain elements (like `<tr>` or `<col>`) require parent elements to be of a certain type by the HTML specification
(ex. <tr> can only be inside <tbody> / <thead>). Before this change Angular template parser was auto-correcting
"invalid" HTML using the following rules:
- `<tr>` would be wrapped in `<tbody>` if not inside `<tbody>`, `<tfoot>` or `<thead>`;
- `<col>` would be wrapped in `<colgroup>` if not inside `<colgroup>`.

This meachanism of automatic wrapping / auto-correcting was problematic for several reasons:
- it is non-obvious and arbitrary (ex. there are more HTML elements that has rules for parent type);
- it is incorrect for cases where `<tr>` / `<col>` are at the root of a component's content, ex.:

```html
<projecting-tr-inside-tbody>
  <tr>...</tr>
</projecting-tr-inside-tbody>
```

In the above example the `<projecting-tr-inside-tbody>` component culd be "surprised" to see additional
`<tbody>` elements inserted by Angular HTML parser.

PR Close #29219
2019-03-14 03:07:01 -04:00
..
util test(ivy): update //packages/compiler tests for Ivy (#27301) 2018-11-29 21:31:35 -08:00
ast_serializer_spec.ts refactor(compiler): use options argument for parsers (#28055) 2019-02-12 20:58:27 -08:00
ast_spec_utils.ts build: update npm dependencies (#19328) 2017-09-22 13:20:52 -07:00
BUILD.bazel test(ivy): update //packages/compiler tests for Ivy (#27301) 2018-11-29 21:31:35 -08:00
html_parser_spec.ts fix(core): don't wrap <tr> and <col> elements into a required parent (#29219) 2019-03-14 03:07:01 -04:00
html_whitespaces_spec.ts build: remove main() from specs (#21053) 2017-12-22 13:10:51 -08:00
icu_ast_expander_spec.ts refactor(compiler): use options argument for parsers (#28055) 2019-02-12 20:58:27 -08:00
lexer_spec.ts fix(ivy): correctly tokenize escaped characters in templates (#28978) 2019-02-28 02:44:19 -08:00