nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: pulldown-cmark/pulldown-cmark
Pull request #879 (2024-04-18 16:21:19)

Mark `Rule` as a block item
Fixes #878



Patch:
diff --git a/pulldown-cmark/specs/regression.txt b/pulldown-cmark/specs/regression.txt
index c239cb8..27c89a3 100644
--- a/pulldown-cmark/specs/regression.txt
+++ b/pulldown-cmark/specs/regression.txt
@@ -2554,3 +2554,19 @@ ISSUE 867
 <p><a href="destination" title="
 text          ">link</a></p>
 ````````````````````````````````
+
+ISSUE 878
+
+```````````````````````````````` example
+* _
+_**
+  ___
+  ^_
+.
+<ul>
+<li>_
+_**
+<hr />
+^_</li>
+</ul>
+````````````````````````````````
diff --git a/pulldown-cmark/src/parse.rs b/pulldown-cmark/src/parse.rs
index 259cf73..70f7b87 100644
--- a/pulldown-cmark/src/parse.rs
+++ b/pulldown-cmark/src/parse.rs
@@ -134,6 +134,7 @@ impl ItemBody {
                 | ItemBody::TableRow
                 | ItemBody::TableCell
                 | ItemBody::Heading(..)
+                | ItemBody::Rule
         )
     }
 }


Test patch:
diff --git a/pulldown-cmark/tests/suite/regression.rs b/pulldown-cmark/tests/suite/regression.rs
index 3628303..3d665b6 100644
--- a/pulldown-cmark/tests/suite/regression.rs
+++ b/pulldown-cmark/tests/suite/regression.rs
@@ -3053,3 +3053,21 @@ text          ">link</a></p>
 
     test_markdown_html(original, expected, false, false, false);
 }
+
+#[test]
+fn regression_test_194() {
+    let original = r##"* _
+_**
+  ___
+  ^_
+"##;
+    let expected = r##"<ul>
+<li>_
+_**
+<hr />
+^_</li>
+</ul>
+"##;
+
+    test_markdown_html(original, expected, false, false, false);
+}