cssifier

Crates.iocssifier
lib.rscssifier
version0.1.3
sourcesrc
created_at2021-03-08 02:34:16.604426
updated_at2021-03-21 07:30:21.081285
descriptionSimple crate to convert XPath selectors to CSS selectors
homepagehttps://gitlab.com/kirbylife/cssifier
repositoryhttps://gitlab.com/kirbylife/cssifier
max_upload_size
id365465
size6,636
kirbylife (kirbylife)

documentation

https://docs.rs/cssifier

README

CSSIFIER_RS

Simple crate to convert XPath selectors to CSS selectors

based on cssify but rewrited in Rust (RiiR FTW).

dependencies:

Usage

The usage is simple:

cssifier("//a/b")
// Some("a b")

cssifier("//a/b[@id='hello']")
// Some(a b#hello)

cssifier("//a/b[contains(text(), 'hello')]")
// Some(a b:contains(hello))

Known issues

  • bug in 'contains' condition
  • invalid XPath return empty String
  • Compatible with WASM

Contributors are welcome :).

Commit count: 14

cargo fmt