emmet-vim icon indicating copy to clipboard operation
emmet-vim copied to clipboard

expand expression without proper output

Open yufeiluo opened this issue 3 years ago • 1 comments

I want to expand the expression :

ul.nav>(li.logo>img)+(li>a)*2

My expectation output is as below:

    <ul class="nav">
        <li class="logo"><img src="" alt=""></li>
        <li><a href=""></a></li>
        <li><a href=""></a></li>
    </ul>

Why the real expanded output is as following:

    <ul class="nav">
        <li class="logo"><img src="" alt=""></li>
        <li><a href=""></a></li>
        <li class="logo"><img src="" alt=""></li>
        <li><a href=""></a></li>
    </ul>

yufeiluo avatar Sep 24 '20 08:09 yufeiluo

Adding a ^ to make your expression:

ul.nav>(li.logo>img)+^(li>a)*2

It seems to me that grouping is not working correctly. After a group is complete the compiler should "climb up" (as with the ^ operator), but it isn't. I suppose a temporary fix could be to use the ^ operator as necessary to "climb up" any levels created by > operators in a grouping.

yomotherboard avatar Sep 25 '20 03:09 yomotherboard