Fix dart-lang/markdown#156, same as dart-lang/markdown#164 (dart-lang/markdown#169)
Fix dart-lang/markdown#156, same as dart-lang/markdown#164
diff --git a/pkgs/markdown/CHANGELOG.md b/pkgs/markdown/CHANGELOG.md
index 855a468..469c685 100644
--- a/pkgs/markdown/CHANGELOG.md
+++ b/pkgs/markdown/CHANGELOG.md
@@ -1,6 +1,7 @@
## 0.11.4
* Fix bug with lazy blockquote continuations (#162)
+* Fix bug with list item continuations (#156)
## 0.11.3
diff --git a/pkgs/markdown/lib/src/block_parser.dart b/pkgs/markdown/lib/src/block_parser.dart
index e7fc5e6..c6589d9 100644
--- a/pkgs/markdown/lib/src/block_parser.dart
+++ b/pkgs/markdown/lib/src/block_parser.dart
@@ -669,10 +669,7 @@
}
// Anything else is paragraph continuation text.
- var continuedLine = childLines.last + parser.current;
- childLines
- ..removeLast()
- ..add(continuedLine);
+ childLines.add(parser.current);
}
parser.advance();
}
diff --git a/pkgs/markdown/test/original/unordered_lists.unit b/pkgs/markdown/test/original/unordered_lists.unit
index 44ab70e..8c30026 100644
--- a/pkgs/markdown/test/original/unordered_lists.unit
+++ b/pkgs/markdown/test/original/unordered_lists.unit
@@ -78,12 +78,13 @@
<ul><li>
<p>one</p><ul><li>nested one</li><li>nested two</li></ul></li><li>
<p>two</p></li></ul>
->>> list item turns what might be an h1 into nothing
+>>> list item allows lazy continuations
- list
-===
+item
<<<
-<ul><li>list===</li></ul>
+<ul><li>list
+item</li></ul>
>>> list item turns what might be an h2 into nothing
- list
---