Skip to content

Commit

Permalink
Add another Anchors example
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyasminocha committed May 2, 2020
1 parent 57a322c commit b4cb1dc
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions chapters/anchors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,21 @@ As the name suggests, it matches everything apart from word boundaries.
<li>{"def \t"}</li>
<li>abc def</li>
</Example>

### Markdown headings

<Example regex={/^## /gm}>
<li># Heading 1</li>
<li>## Heading 2</li>
<li>### Heading 3</li>
<li>#### Heading 4</li>
</Example>

Without anchors:

<Example regex={/## /gm}>
<li># Heading 1</li>
<li>## Heading 2</li>
<li>### Heading 3</li>
<li>#### Heading 4</li>
</Example>

1 comment on commit b4cb1dc

@vercel
Copy link

@vercel vercel bot commented on b4cb1dc May 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please # to comment.