File: gfm_tasklist.rs

package info (click to toggle)
rust-pulldown-cmark 0.10.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 924 kB
  • sloc: makefile: 14
file content (45 lines) | stat: -rw-r--r-- 871 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// This file is auto-generated by the build script
// Please, do not modify it manually

use super::test_markdown_html;

#[test]
fn gfm_tasklist_test_1() {
    let original = r##"- [ ] foo
- [x] bar
"##;
    let expected = r##"<ul>
<li><input disabled="" type="checkbox"/>
foo</li>
<li><input disabled="" type="checkbox" checked=""/>
bar</li>
</ul>
"##;

    test_markdown_html(original, expected, false, false, false);
}

#[test]
fn gfm_tasklist_test_2() {
    let original = r##"- [x] foo
  - [ ] bar
  - [x] baz
- [ ] bim
"##;
    let expected = r##"<ul>
<li><input disabled="" type="checkbox" checked=""/>
foo
<ul>
<li><input disabled="" type="checkbox"/>
bar</li>
<li><input disabled="" type="checkbox" checked=""/>
baz</li>
</ul>
</li>
<li><input disabled="" type="checkbox"/>
bim</li>
</ul>
"##;

    test_markdown_html(original, expected, false, false, false);
}