-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(material/schematics): tree operation helper functions #24539
feat(material/schematics): tree operation helper functions #24539
Conversation
wagnermaciel
commented
Mar 7, 2022
- created tree-traversal.ts for storing tree operation helper fns
- moved visitElements to the new file
- created helper fns for parseTemplate, and tag name changes
- added unit tests which don't need to call the whole schematic
* created tree-traversal.ts for storing tree operation helper fns * moved visitElements to the new file * created helper fns for parseTemplate, and tag name changes * added unit tests which don't need to call the whole schematic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM aside from minor comments
src/material/schematics/ng-generate/mdc-migration/rules/tree-traversal.ts
Outdated
Show resolved
Hide resolved
if (!node.endSourceSpan) { | ||
return html; | ||
} | ||
return replaceAt(html, node.endSourceSpan.start.offset + 2, node.name, tag); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is this 2 coming from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 2 comes from the </
at the beginning of html end tags
src/material/schematics/ng-generate/mdc-migration/rules/tree-traversal.ts
Outdated
Show resolved
Hide resolved
…4539) * feat(material/schematics): tree operation helper functions * created tree-traversal.ts for storing tree operation helper fns * moved visitElements to the new file * created helper fns for parseTemplate, and tag name changes * added unit tests which don't need to call the whole schematic
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |