Closed rolfn closed 5 years ago
I've added basic support for the nth-child
selector - only numbered selector works, not odd, even or anything more advanced. It seems to work with your example.
Best, Michal
I tried it again with my example. It doesn't work:
luaxml-cssquery.lua:64: attempt to call method 'get_siblings' (a nil value)
stack traceback:
./luaxml-cssquery.lua:64: in function 'make_nth'
./luaxml-cssquery.lua:82: in function <./luaxml-cssquery.lua:58>
(...tail calls...)
./luaxml-cssquery.lua:123: in function 'test_object'
./luaxml-cssquery.lua:137: in function 'match_query'
./luaxml-cssquery.lua:147: in function 'match_querylist'
[\directlua]:26: in function 'fn'
./luaxml-domobject.lua:343: in function 'traverse_elements'
./luaxml-domobject.lua:347: in function 'traverse_elements'
[\directlua]:25: in main chunk.
\luacode@dbg@exec ...code@maybe@printdbg {#1} #1 }
Where is the method get_siblings
defined?
Ah, sorry, I forgot to push fixes in luaxml-domobject.lua
to the repo. It should work now.
Yes, it works now. Many thanks.
Greetings from Berlin Rolf
I try CSS selection with the library
luaxml-cssquery
in the following way:Instead of one result
bar
I get three results (foo
,bar
, andbaz
). What is wrong here? Thanks in advance.Rolf