forked from angular/angular
-
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.
fix(language-service): Use last child end span for parent without clo…
…se tag Unclosed element tags are not assigned an `endSourceSpan` by the parser. As a result, the visitor which determines the target node at a position for the language service was unable to determine that a given position was inside an unclosed parent. This happens because we update the `endSourceSpan` of template/element nodes to be the end tag (and there is not one for unclosed tags). Consequently, the visitor then cannot match a position to any child node location. This change updates the visitor logic to check if there are any `children` of a template/element node and updates the end span to be the end span of the last child. This allows our `isWithin` logic to identify that a child position is within the unclosed parent. Addresses one of the issues found during investigation of angular/vscode-ng-language-service#1399
- Loading branch information
Showing
2 changed files
with
47 additions
and
3 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