From 90bb397870e7d38bf0b3276c03c162a5e70112fd Mon Sep 17 00:00:00 2001 From: Thomas Allmer Date: Thu, 16 Apr 2020 10:51:18 +0200 Subject: [PATCH] chore(remark-extend): clarify selection examples --- packages/remark-extend/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/remark-extend/README.md b/packages/remark-extend/README.md index 0499b5538..0200fa995 100644 --- a/packages/remark-extend/README.md +++ b/packages/remark-extend/README.md @@ -39,13 +39,14 @@ Some examples are: - `:root` for the top of the markdown file - `:scope:last-child` for the end of the markdown file - `heading:has([value=Red])` first heading with a text value of Red (e.g. ### Red) -- `heading[depth=2]` first third level heading (e.g. ## Something) +- `heading[depth=2]` first second level heading (e.g. ## Something) +- `heading[depth=2]:has([value=Red]) ~ heading[depth=2]` following h2 after h2 with "Red" (e.g. ## Red ... ## Something) ### Markdown AST All adjustments to the markdown file happen via the markdown AST (Abstract Syntax Tree). -You can explore it via the [ASTExplorer](https://astexplorer.net/). +You can explore it via the [ASTExplorer](https://astexplorer.net/). (> Markdown > remark) ```md ### Red