Skip to content
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

End tag is incorrectly changed when adding property #31

Open
ShadowDancer opened this issue Aug 28, 2020 · 0 comments
Open

End tag is incorrectly changed when adding property #31

ShadowDancer opened this issue Aug 28, 2020 · 0 comments

Comments

@ShadowDancer
Copy link
Contributor

<Grid>
   <$
</Grid>

Assume $ is cursor. User types "Grid.ColumnDefinitions".
Expected result:

<Grid>
   <Grid.ColumnDefinitions
</Grid>

Actual result:

<Grid>
   <Grid.ColumnDefinitions
</Grid.ColumnDefinitions>

This happens because "RenameEndTag" text manipulation matches <Grid.> with end tag, and it does not know, that user is typing Grid property and he will close that tag in future. I see 2 potential ways to solve this:

  1. When renaming tags, do not add . It will work, but may cut some useful features (ie. may rename tag partially, when user wants to add . - renaming Grid.ColumnDefinitions to Grid.RowDefinitions etc.)
  2. Give more context for xml analyzer, so it knows that tags won't match, like this:
<Grid> <!-- depth 0 -->
   <$  <!-- depth 1 -->
</Grid> <!-- depth 0 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant