aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-03-31 17:12:59 -0400
committerHolden Rohrer <hr@hrhr.dev>2020-03-31 17:12:59 -0400
commit74c61753dfb73fa7899d1a1d682c3b4cf92a28b6 (patch)
tree5b8e215dfa11b22ba3f7d60cb9f3fcb59f393fb4
parent2e2f16f714e9724d188cd5d27d4de155d0887f36 (diff)
fixed double spacing on empty lines
-rw-r--r--badroff.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/badroff.c b/badroff.c
index 7dff4f1..123deba 100644
--- a/badroff.c
+++ b/badroff.c
@@ -144,6 +144,7 @@ char* typeset(void){
// wsend is last index with a piece of whitespace
for (len = min(wsend,len-1); next[len] == ' '; len--);
// check, within the string, behind the whitespace for a letter.
+ if (next[len] == '\n') len--; // "\n" shouldn't become "\n\n"
// len should be *index of* last letter
if (peekchrbuf(inbuf, wsend) == '\n') cont_typst = false;
else cont_typst = true;