@@ -45,18 +45,30 @@ console.log(myMarked('# heading+', { renderer: renderer }));
45
45
46
46
### Block level renderer methods
47
47
48
- - code(* string* code, * string* language , * boolean* escaped)
48
+ - code(* string* code, * string* infostring , * boolean* escaped)
49
49
- blockquote(* string* quote)
50
50
- html(* string* html)
51
- - heading(* string* text, * number* level, * string* rawtext )
51
+ - heading(* string* text, * number* level, * string* raw, * Slugger * slugger )
52
52
- hr()
53
53
- list(* string* body, * boolean* ordered, * number* start)
54
54
- listitem(* string* text)
55
+ - checkbox(* boolean* checked)
55
56
- paragraph(* string* text)
56
57
- table(* string* header, * string* body)
57
58
- tablerow(* string* content)
58
59
- tablecell(* string* content, * object* flags)
59
60
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
+
60
72
` flags ` has the following properties:
61
73
62
74
``` js
0 commit comments