From 8566a933a3acda2e6beecebbc8f6e558993bf354 Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Tue, 21 Dec 2021 00:05:59 -0500 Subject: [PATCH] Change block-code to put inside

According to the MDN, this is how it was meant to be! [1]

[1]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code
---
 blag.c        | 4 ++--
 test/big.html | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/blag.c b/blag.c
index aecee58..769c223 100644
--- a/blag.c
+++ b/blag.c
@@ -92,7 +92,7 @@ void handle_lf(state *s) {
     if (s->lastc == '\n') {
         switch (s->in) {
             case PARAGRAPH: printf("

\n"); break; - case CODE: printf("
\n"); break; + case CODE: printf("\n"); break; case QUOTE: printf("\n"); break; case LIST: s->previndent = 0; @@ -239,7 +239,7 @@ int parse() { case '>': if (s.in == NONE) { s.in = c == '>' ? QUOTE : CODE; - printf("%s\n", c == '>' ? "
" : "
");
+                    printf("%s\n", 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 8c43f9f..1618ffa 100644
--- a/test/big.html
+++ b/test/big.html
@@ -58,11 +58,11 @@ my gopherhole.
  this is a block quote
  that wraps!
 
-
+

 $ this is a code block
 $ *bold* and _italics_ and `code` have no effect!
 $ git status
-
+

<html> is escaped!

-- libgit2 1.1.1