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

Is it possible to disable closing a tag when it ends with />? #13

Closed
gitusp opened this issue Feb 6, 2019 · 1 comment · Fixed by #14
Closed

Is it possible to disable closing a tag when it ends with />? #13

gitusp opened this issue Feb 6, 2019 · 1 comment · Fixed by #14

Comments

@gitusp
Copy link
Contributor

gitusp commented Feb 6, 2019

Hi,

I added '<*>': {'closer': ‘</*>’, ‘not_if’: [‘br’, …]} to g:pear_tree_pairs to enable auto-close for HTML tags, and it worked fine.
But I noticed, in JSX, there are tags that can take both form <Foo></Foo> and <Foo />, so that I can not simply add Foo to not_if condition.

I thought it would be nice to disable auto-closing when an opener ends with />. But I could not find a way to configure such a condition.
Could you tell me whether there is a way to achieve the above condition?

Anyway, thank you for publishing such a great plugin! I think this is the most sophisticated auto-close plugin.

@gitusp
Copy link
Contributor Author

gitusp commented Feb 6, 2019

I thought some modification is needed to achieve this.
For now, I'm using my forked version and seems to be working fine.
I also made a PR, but I'm not sure if the modification is compatible with your design concept.
So feel free to request me changes.

Thank you. 😄

@tmsvg tmsvg closed this as completed in #14 Feb 10, 2019
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.

1 participant