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

Question: “Lorem Ipsum” generator and Grouping #496

Closed
albrin opened this issue Apr 14, 2017 · 2 comments
Closed

Question: “Lorem Ipsum” generator and Grouping #496

albrin opened this issue Apr 14, 2017 · 2 comments

Comments

@albrin
Copy link

albrin commented Apr 14, 2017

How to correctly use “Lorem Ipsum” generator for grouped elements?

dl>(dt>lorem3+dd>lorem3)*2

I receive

<dl>
    <dt>Lorem ipsum dolor.
        <dd>Lorem ipsum dolor.</dd>
    </dt>
    <dt>Sapiente tempore, natus.
        <dd>Assumenda quibusdam, id!</dd>
    </dt>
</dl>

I expect to receive

<dl>
    <dt>Itaque, exercitationem fuga.</dt>
    <dd>Lorem ipsum dolor.</dd>
    <dt>Odio, enim, vero.</dt>
    <dd>Praesentium, suscipit temporibus.</dd>
</dl>

Environment:
Visual Studio Code 1.11.2

@hannesfrank
Copy link

The sibling operator + binds stronger than/takes precendence over the child operator >, so you have to group at least the first child operator, like

dl>((dt>lorem3)+dd>lorem3)*2

which results in

    <dl>
        <dt>Lorem ipsum dolor.</dt>
        <dd>Lorem ipsum dolor.</dd>
        <dt>Cumque, voluptatibus, deleniti?</dt>
        <dd>At, ut fugiat.</dd>
    </dl>

@sergeche
Copy link
Member

The > operator changes element context so you have to either use ^ operator to climb up the tree (dl>(dt>lorem3^dd>lorem3)*2) or use grouping as @hannesfrank suggests

@albrin albrin closed this as completed Jun 2, 2017
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

No branches or pull requests

3 participants