Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Matching wrong elements with similar names #378

Closed
1 task done
chescos opened this issue Jan 20, 2019 · 1 comment
Closed
1 task done

Matching wrong elements with similar names #378

chescos opened this issue Jan 20, 2019 · 1 comment

Comments

@chescos
Copy link

chescos commented Jan 20, 2019

Prerequisites

Description

The bracket matcher seems to match the wrong element if a child element contains the name of the parent.

Steps to Reproduce

  1. Copy the code below into an .html file
  2. Move your cursor to the first line (<v-element>) and see which element gets matched

Code:

<v-element>
    <v-element-sub></v-element-sub>
</v-element>

Expected behavior: Match <v-element>with </v-element>

Actual behavior: Match <v-element> with </v-element-sub>

Reproduces how often: 100%

Versions

Atom: 1.34.0
Electron: 2.0.16
Chrome: 61.0.3163.100
Node: 8.9.3
OS: Ubuntu 18.04

Additional Information

Screenshot:

selection_433

@rsese
Copy link

rsese commented Jan 25, 2019

Thanks for contributing! I can reproduce with 1.34.0 on macOS 10.12.6 but this looks close enough to #353 that we'll close as a duplicate for now (e.g. if I remove the - from the element name, the matching works). You can subscribe to that issue if you'd like and if this ends up being a different issue, we can always reopen.


Because we treat our issues list as the Atom team's backlog, we close duplicates to focus our work and not have to touch the same chunk of code for the same reason multiple times. This is also why we may mark something as duplicate that isn't an exact duplicate but is closely related.

For information on how to use GitHub's search feature to find out if something is a duplicate before filing, see the How Can I Contribute? section of the Atom CONTRIBUTING guide.

@rsese rsese closed this as completed Jan 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants