From be2d655fe51856a5986a8811510c82192a544bea Mon Sep 17 00:00:00 2001 From: Marat Dulin Date: Mon, 2 Oct 2023 12:21:19 +0200 Subject: [PATCH] docs: update readme --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 431deae..ae1a5bf 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Usage import {createParser} from 'css-selector-parser'; const parse = createParser(); -const selector = parse('a[href^="/"], .container:has(nav) > a[href]:nth-child(2)'); +const selector = parse('a[href^="/"], .container:has(nav) > a[href]:nth-child(2)::before'); console.log(selector); ``` @@ -84,6 +84,10 @@ Produces: type: 'PseudoClass', name: 'nth-child', argument: { type: 'Formula', a: 0, b: 2 } + }, + { + type: 'PseudoElement', + name: 'before' } ], combinator: '>'