aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/construct/partial_label.rs3
-rw-r--r--tests/fuzz.rs14
2 files changed, 16 insertions, 1 deletions
diff --git a/src/construct/partial_label.rs b/src/construct/partial_label.rs
index 255fde1..f56a591 100644
--- a/src/construct/partial_label.rs
+++ b/src/construct/partial_label.rs
@@ -197,8 +197,9 @@ pub fn eol_after(tokenizer: &mut Tokenizer) -> State {
/// | b]
/// ```
pub fn at_blank_line(tokenizer: &mut Tokenizer) -> State {
- tokenizer.tokenize_state.marker = 0;
tokenizer.tokenize_state.connect = false;
+ tokenizer.tokenize_state.seen = false;
+ tokenizer.tokenize_state.size = 0;
State::Nok
}
diff --git a/tests/fuzz.rs b/tests/fuzz.rs
new file mode 100644
index 0000000..3cc1066
--- /dev/null
+++ b/tests/fuzz.rs
@@ -0,0 +1,14 @@
+extern crate micromark;
+use micromark::micromark;
+use pretty_assertions::assert_eq;
+
+#[test]
+fn fuzz() -> Result<(), String> {
+ assert_eq!(
+ micromark("[\n~\na\n-\n\n"),
+ "<p>[\n~\na</p>\n<ul>\n<li></li>\n</ul>\n",
+ "1"
+ );
+
+ Ok(())
+}