Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Bug: Parentheses inside text node are considered invalid hence expansion doesn't work #31

Closed
devanshj opened this issue Jul 21, 2019 · 1 comment · Fixed by #32
Closed
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded

Comments

@devanshj
Copy link
Contributor

div{ foo (bar) baz } should expand to <div>foo (bar) baz</div>. But currently this does not work because it's considered an invalid expression due to the following code

// Its common for users to type (sometextinsidebrackets), this should not be treated as an abbreviation
// Grouping in abbreviation is valid only if preceeded/succeeded with one of the symbols for nesting, sibling, repeater or climb up
if (!/\(.*\)[>\+\*\^]/.test(abbreviation) && !/[>\+\*\^]\(.*\)/.test(abbreviation) && /\(/.test(abbreviation) && /\)/.test(abbreviation)) {
return false;
}

Restricting ( and ) to be only next to >, +, * or ^ misses the case where ( or) are inside { and } that is in a text node.

Actual behavior:

Expected behavior (as seen on emmet's docs):

I'll be sending a PR soon!

@roblourens
Copy link
Member

verified ✔️

@mjbvz mjbvz added the verified Verification succeeded label Oct 4, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants