From db1d1cb328a53fa466c9f53e8c84e0f2b8befca3 Mon Sep 17 00:00:00 2001
From: Alex Karle blocks
Since we're in the
block, the newline matters! It's less
pretty HTML, but otherwise we end up with an extraneous newline
at the start of the code block!
---
blag.c | 2 +-
test/big.html | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/blag.c b/blag.c
index 769c223..8992d79 100644
--- a/blag.c
+++ b/blag.c
@@ -239,7 +239,7 @@ int parse() {
case '>':
if (s.in == NONE) {
s.in = c == '>' ? QUOTE : CODE;
- printf("%s\n", c == '>' ? "
" : "
");
+ printf("%s", c == '>' ? "
" : "
");
} else if (s.lastc == '\n' && c == (s.in == CODE ? '\t' : '>')) {
/* no op */
} else {
diff --git a/test/big.html b/test/big.html
index 1618ffa..76ee354 100644
--- a/test/big.html
+++ b/test/big.html
@@ -54,12 +54,10 @@ 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 +
-- libgit2 1.1.1$ this is a code block $ *bold* and _italics_ and `code` have no effect! $ git status