Fix dart-lang/markdown#162 by properly putting bq lazy continuations on their own line (dart-lang/markdown#164)
Fix dart-lang/markdown#162 by properly putting bq lazy continuations on their own line
diff --git a/pkgs/markdown/CHANGELOG.md b/pkgs/markdown/CHANGELOG.md
index 32fe122..855a468 100644
--- a/pkgs/markdown/CHANGELOG.md
+++ b/pkgs/markdown/CHANGELOG.md
@@ -1,6 +1,10 @@
+## 0.11.4
+
+* Fix bug with lazy blockquote continuations (#162)
+
## 0.11.3
-* Deprecated `escapeHtml`. This code exists in `dart:convert`.
+* Deprecate `escapeHtml`. This code exists in `dart:convert`.
## 0.11.2
@@ -9,12 +13,12 @@
## 0.11.1
-* Added version information:
+* Add version information:
* `dart bin/markdown.dart --version` now shows the package version number.
* The playground app now shows the version number.
* Improve autolink parsing.
-* Added new table syntax: `TableSyntax`.
-* Added new ExtensionSet that includes the table syntax: `ExtensionSet.gitHub`.
+* Add new table syntax: `TableSyntax`.
+* Add new ExtensionSet that includes the table syntax: `ExtensionSet.gitHub`.
* For development: added `tool/travis.sh`.
* Support multiline Setext headers.
* Handle loose-vs-strict list items better.
@@ -22,7 +26,7 @@
## 0.11.0+1
-* Added playground app at https://dart-lang.github.io/markdown.
+* Add playground app at https://dart-lang.github.io/markdown.
## 0.11.0
diff --git a/pkgs/markdown/lib/src/block_parser.dart b/pkgs/markdown/lib/src/block_parser.dart
index f8555f8..e7fc5e6 100644
--- a/pkgs/markdown/lib/src/block_parser.dart
+++ b/pkgs/markdown/lib/src/block_parser.dart
@@ -335,10 +335,7 @@
// a Setext header.
if (parser.blockSyntaxes.firstWhere((s) => s.canParse(parser))
is ParagraphSyntax) {
- var continuedLine = childLines.last + parser.current;
- childLines
- ..removeLast()
- ..add(continuedLine);
+ childLines.add(parser.current);
parser.advance();
} else {
break;
diff --git a/pkgs/markdown/test/original/block_quotes.unit b/pkgs/markdown/test/original/block_quotes.unit
index 14107ef..2d0d559 100644
--- a/pkgs/markdown/test/original/block_quotes.unit
+++ b/pkgs/markdown/test/original/block_quotes.unit
@@ -25,13 +25,13 @@
<p>two</p>
<blockquote>
<p>three</p></blockquote></blockquote></blockquote>
->>> quote turns what might be an h1 into nothing
+>>> qoute with lazy continuation
> quote
-===
-
+text
<<<
<blockquote>
-<p>quote===</p></blockquote>
+<p>quote
+text</p></blockquote>
>>> quote turns what might be an h2 into an hr
> quote
---