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

Commenting out starting tag causes strange behavior on ending tag #93

Open
zypA13510 opened this issue Dec 22, 2018 · 1 comment
Open

Comments

@zypA13510
Copy link

For example, if I have the code below:

<div class="parent">
  <div class="child">
    <a href="http://example.com/">a link</a>
  </div>
</div>

Now if I want to comment out the entire child <div> block, I would add !-- before div> so it becomes:

<div class="parent">
  <!--div class="child">
    <a href="http://example.com/">a link</a>
  </div>
</div>

However, when trying to change the ending tag, by adding -- after </div, this extension tries to match that by adding -- to the starting tag of parent <div>:

<div-- class="parent">
  <!--div class="child">
    <a href="http://example.com/">a link</a>
  </div-->
</div>

As you can see this causes some inconvenience.

Proposal

I would suggest disabling the rename behavior inside comments (since the staring <!-- is in place, all the code following that should be considered comment until --> is inserted)

@tdd
Copy link

tdd commented Jan 25, 2019

Regex fail, clearly. The entire pairing system needs to be redone.

@SimonSiefke SimonSiefke mentioned this issue Jan 11, 2020
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 a pull request may close this issue.

2 participants