emacs-vs / auto-rename-tag

Automatically rename paired HTML/XML tag.
GNU General Public License v3.0
38 stars 10 forks source link

XML Namespace Confusion #7

Closed webdevelopers-eu closed 5 years ago

webdevelopers-eu commented 5 years ago

Hello,

thanks for your code, it is indeed great idea.

Unfortunately the code seems to be unfriendly to XML namespaces. I ran into following issues with this example:

<a xmlns:a="test">
    <x>ups</x>
    <a:y>ups</a:y>
    <a:z>ups</a:z>
</a>
  1. Try to rename opening tag - it modifies instead (renaming closing seem to work)
  2. Try to rename opening - closing tag is not renamed. Renaming the namespace works.
  3. Try to rename closing </a:z> - it renames instead.

Thanks!

webdevelopers-eu commented 5 years ago

Thank you. Good job!

There is one small thing left - renaming opening <a>, it does not rename the closing </a>. I consider it as really minor inconvenience. Important is that it does not modify incorrect nested tag. So I don't consider it as a bug. Take it rather as a tip for future improvements.

Thumbs up!

jcs090218 commented 5 years ago

Interesting, I didn't encounter this issue... Not sure how is that happening... :(