Skip to content

Commit 40ad6f1

Browse files
authored
Merge branch 'master' into version-worker
2 parents 14da71c + bf0399b commit 40ad6f1

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

docs/USING_PRO.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,30 @@ console.log(myMarked('# heading+', { renderer: renderer }));
4545

4646
### Block level renderer methods
4747

48-
- code(*string* code, *string* language, *boolean* escaped)
48+
- code(*string* code, *string* infostring, *boolean* escaped)
4949
- blockquote(*string* quote)
5050
- html(*string* html)
51-
- heading(*string* text, *number* level, *string* rawtext)
51+
- heading(*string* text, *number* level, *string* raw, *Slugger* slugger)
5252
- hr()
5353
- list(*string* body, *boolean* ordered, *number* start)
5454
- listitem(*string* text)
55+
- checkbox(*boolean* checked)
5556
- paragraph(*string* text)
5657
- table(*string* header, *string* body)
5758
- tablerow(*string* content)
5859
- tablecell(*string* content, *object* flags)
5960

61+
`slugger` has the `slug` method to create an unique id from value:
62+
63+
```js
64+
slugger.slug('foo') // foo
65+
slugger.slug('foo') // foo-1
66+
slugger.slug('foo') // foo-2
67+
slugger.slug('foo 1') // foo-1-1
68+
slugger.slug('foo-1') // foo-1-2
69+
...
70+
```
71+
6072
`flags` has the following properties:
6173

6274
```js

0 commit comments

Comments
 (0)