Skip to content

first-child #139

@arbaev

Description

@arbaev

Hi!

I am a bit confused by the work of pseudoclass "first-child" selector.
I have next simple setup:

<table>
    <tr>
        <td>first</td>
        <td>second</td>
        <td>third <strong>strong</strong></td>
        <td>last</td>
    </tr>
</table>

And then I want to select only first td:

user=> (map html/text (html/select (get-my-html) [:tr html/first-child]))
("first" "strong" )

Why is there strong?
How to avoid of selecting children of a child elements?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions