Skip to content

Commit 82b9aa2

Browse files
committed
chore: add comments
1 parent f26f7b3 commit 82b9aa2

File tree

4 files changed

+28
-6
lines changed

4 files changed

+28
-6
lines changed

SECURITY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- angular-html-parser: DO NOT CHANGE @fisker -->
12
## Security contact information
23

34
To report a security vulnerability, please use the

integration/platform-server-hydration/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* To learn more about this file see: https://angular.io/guide/typescript-configuration. */
1+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
22
{
33
"compileOnSave": false,
44
"compilerOptions": {

packages/compiler/src/ml_parser/html_parser.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,24 @@ export class HtmlParser extends Parser {
1616
super(getHtmlTagDefinition);
1717
}
1818

19-
override parse(source: string, url: string, options?: TokenizeOptions, isTagNameCaseSensitive = false, getTagContentType?: (tagName: string, prefix: string, hasParent: boolean, attrs: Array<{prefix: string, name: string, value?: string}>) => void | TagContentType): ParseTreeResult {
20-
return super.parse(source, url, options, isTagNameCaseSensitive, getTagContentType);
19+
// angular-html-parser: More options
20+
override parse(
21+
source: string,
22+
url: string,
23+
options?: TokenizeOptions,
24+
isTagNameCaseSensitive = false,
25+
getTagContentType?: (tagName: string, prefix: string, hasParent: boolean, attrs: Array<{prefix: string, name: string, value?: string}>) => void | TagContentType
26+
): ParseTreeResult {
27+
return super.parse(
28+
source,
29+
url,
30+
options,
31+
isTagNameCaseSensitive,
32+
getTagContentType,
33+
);
2134
}
35+
36+
// override parse(source: string, url: string, options?: TokenizeOptions): ParseTreeResult {
37+
// return super.parse(source, url, options);
38+
// }
2239
}

packages/compiler/src/ml_parser/html_tags.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,13 @@ export function getHtmlTagDefinition(tagName: string): HtmlTagDefinition {
188188
}
189189
// We have to make both a case-sensitive and a case-insensitive lookup, because
190190
// HTML tag names are case insensitive, whereas some SVG tags are case sensitive.
191+
192+
// angular-html-parser: modification
191193
return (
192-
TAG_DEFINITIONS[tagName] ??
193-
// TAG_DEFINITIONS[tagName.toLowerCase()] ?? -- angular-html-parser modification
194-
DEFAULT_TAG_DEFINITION
194+
TAG_DEFINITIONS[tagName] ?? DEFAULT_TAG_DEFINITION
195195
);
196+
197+
// return (
198+
// TAG_DEFINITIONS[tagName] ?? TAG_DEFINITIONS[tagName.toLowerCase()] ?? DEFAULT_TAG_DEFINITION
199+
// );
196200
}

0 commit comments

Comments
 (0)