forked from ember-template-lint/ember-template-recast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make printing more robust to manually created glimmer nodes
Fixes ember-template-lint#586 Previously, calling print on node that came from our parse(), but was not the top-level node, would cause infinite recursion. (It would have NodeInfo, but not a registered parse result). This fixes the infinite loop, by just storing a reference to the top-level parse result in the node info, and using that. Importantly, this successfully preserves formatting for any sub-nodes we did parse ourselves, or any user-created nodes that require custom printing.
- Loading branch information
Showing
3 changed files
with
29 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters