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

Fixed tag rename for XML tags containing colons #1135

Merged
merged 1 commit into from
Dec 9, 2021

Conversation

AlexXuChen
Copy link
Contributor

@AlexXuChen AlexXuChen commented Dec 8, 2021

Fixed tag rename for XML tags containing colons, fixed duplicate rename for namespace tags.

Fixes redhat-developer/vscode-xml/issues/621

Signed-off-by: Alexander Chen [email protected]

Behaviour:
Peek 2021-12-08 16-48

@AlexXuChen AlexXuChen force-pushed the issue621-xml branch 2 times, most recently from ea32b05 to bc21ab0 Compare December 8, 2021 21:45
Copy link
Contributor

@rgrunber rgrunber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me overall. @angelozerr , let me know if it's fine with you.

@AlexXuChen AlexXuChen marked this pull request as ready for review December 8, 2021 23:59
@angelozerr
Copy link
Contributor

angelozerr commented Dec 9, 2021

@AlexXuChen it should be nice to have 2 tests with your PR:

  • test which rename ns
  • test which rename local name

@AlexXuChen
Copy link
Contributor Author

@AlexXuChen it should be nice to have 2 tests with your PR:

  • test which rename ns
  • test which rename local name

These tests exist in https://github.com/eclipse/lemminx/blob/master/org.eclipse.lemminx/src/test/java/org/eclipse/lemminx/services/XMLRenameTest.java, although not explicitly called ns:..., however the behaviour is the same. I made the bug fix such that no tests would break.

@angelozerr
Copy link
Contributor

angelozerr commented Dec 9, 2021

These tests exist in https://github.com/eclipse/lemminx/blob/master/org.eclipse.lemminx/src/test/java/org/eclipse/lemminx/services/XMLRenameTest.java, although not explicitly called ns:..., however the behaviour is the same. I made the bug fix such that no tests would break.

The main idea is to copy/paste a test with ns rename and change the newText with ns:BBB instead of BBB and do the same thing for local name rename.

@angelozerr angelozerr merged commit e41b18c into eclipse-lemminx:master Dec 9, 2021
@angelozerr
Copy link
Contributor

It works like a charm, good job @AlexXuChen !

@AlexXuChen AlexXuChen deleted the issue621-xml branch December 9, 2021 19:26
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

Successfully merging this pull request may close these issues.

Renaming Tags with namespaces duplicates namespace
3 participants