Skip to content

Commit 8b41cfa

Browse files
Fix type of start on list in mdast
Closes GH-17. Co-authored-by: Christian Murphy <[email protected]>
1 parent cd782d3 commit 8b41cfa

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/mdast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ pub struct List {
558558
pub ordered: bool,
559559
/// Starting number of the list.
560560
/// `None` when unordered.
561-
pub start: Option<u8>,
561+
pub start: Option<u32>,
562562
/// One or more of its children are separated with a blank line from its
563563
/// siblings (when `true`), or not (when `false`).
564564
pub spread: bool,

tests/fuzz.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
extern crate markdown;
2-
use markdown::{to_html, to_html_with_options, Options};
2+
use markdown::{mdast, to_html, to_html_with_options, to_mdast, Options};
33
use pretty_assertions::assert_eq;
44

55
#[test]
@@ -39,13 +39,21 @@ fn fuzz() -> Result<(), String> {
3939
assert_eq!(
4040
to_html("_ "),
4141
"<p>_</p>",
42-
"4-b: trailing whitespace and broken data"
42+
"4-b: trailing whitespace and broken data (GH-13)"
4343
);
4444

4545
assert_eq!(
4646
to_html_with_options("a ~ ", &Options::gfm())?,
4747
"<p>a ~</p>",
48-
"4-c: trailing whitespace and broken data"
48+
"4-c: trailing whitespace and broken data (GH-14)"
49+
);
50+
51+
assert!(
52+
matches!(
53+
to_mdast("123456789. ok", &Default::default()),
54+
Ok(mdast::Node::Root(_))
55+
),
56+
"5: lists should support high start numbers (GH-17)"
4957
);
5058

5159
Ok(())

0 commit comments

Comments
 (0)