Skip to content

Commit

Permalink
docs(readme): turn "Example" into a heading; use Bitly for demo site
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Dec 27, 2020
1 parent 8593863 commit 53c3e28
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
mdtocs(string)
```

Example:
This library uses [regex](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions) to parse [Markdown headings](https://www.markdownguide.org/basic-syntax/#headings). As a result, edge cases like headings with links and images won't be generated correctly. Inspired by the [blog post](http://b.remarkabl.org/3rgdgCk).

#### Example

```js
const { mdtocs } = require('mdtocs');
mdtocs('# Hello, World!'); // '- [Hello, World!](#hello-world)'
```

This library uses [regex](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions) to parse [Markdown headings](https://www.markdownguide.org/basic-syntax/#headings). As a result, edge cases like headings with links and images won't be generated correctly. Inspired by the [blog post](http://b.remarkabl.org/3rgdgCk).

[Demo](https://remarkablemark.org/mdtocs/) | [Repl.it](https://repl.it/@remarkablemark/mdtocs) | [JSFiddle](https://jsfiddle.net/remarkablemark/dr03pLxn/)
[Site](https://b.remarkabl.org/mdtocs) | [Repl.it](https://repl.it/@remarkablemark/mdtocs) | [JSFiddle](https://jsfiddle.net/remarkablemark/dr03pLxn/)

## Install

Expand Down

0 comments on commit 53c3e28

Please sign in to comment.