From 9dd4642bc4c9111d1d58f506f5065125c9e858ed Mon Sep 17 00:00:00 2001
From: Alex Karle
");
+ } else if (lastc == '\n' && c == '\t') {
+ /* no op */
+ } else {
+ putesc(c);
+ }
+ break;
case '>':
if (in == NONE) {
- in = c == '>' ? QUOTE : CODE;
- printf("%s", c == '>' ? "" : "");
- } else if (lastc == '\n' && c == (in == CODE ? '\t' : '>')) {
+ in = PARAGRAPH;
+ /* only start a new blockquote block is not already in one */
+ printf("%s", blockquote ? "\n" : "
\n\n");
+ blockquote = true;
+ } else if (lastc == '\n' && c == '>') {
/* no op */
} else {
putesc(c);
diff --git a/test/big.html b/test/big.html
index 29e7f14..b16f617 100644
--- a/test/big.html
+++ b/test/big.html
@@ -54,8 +54,11 @@ This is a paragraph dangit with
links to https://alexkarle.com and
my gopherhole.
- this is a block quote
+
+
+ this is a block quote
that wraps!
+
$ this is a code block
$ *bold* and _italics_ and `code` have no effect!
@@ -80,3 +83,11 @@ with a newline!
this is another link
with a newline!
+
+
+ This is a block quote
+
+
+ With two paragraphs!
+
+
diff --git a/test/big.txt b/test/big.txt
index 6693f77..f1f5cc9 100644
--- a/test/big.txt
+++ b/test/big.txt
@@ -49,3 +49,7 @@ with a newline!]
[https://example.com
this is another link
with a newline!]
+
+> This is a block quote
+>
+> With two paragraphs!
--
libgit2 1.1.1