richterm

"terminal emulator" with support for text fonts and images for plan9
git clone git://nsmpr.xyz/richterm.git
Log | Files | Refs | README

commit 68dabbd1c709897612a92929f8394bc2bff3f8af
parent 9ce0c2cd284e4c1d8925daf0926bc26fe3869406
Author: Pavel Renev <an2qzavok@gmail.com>
Date:   Sat, 16 Oct 2021 11:14:50 +0000

markdown: preserve original formatting to make displaying of plain text files look better

Diffstat:
Mextra/Markdown.c | 25+++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/extra/Markdown.c b/extra/Markdown.c @@ -111,11 +111,11 @@ lnewline(void) case 0: lex = nil; break; - case '\n': - consume(); - emitpbrk(); - tok.type = TUNDEF; - break; + // case '\n': + // consume(); + // emitpbrk(); + // tok.type = TUNDEF; + // break; case '#': lex = lheader; consume(); @@ -132,7 +132,7 @@ lnewline(void) case '[': lex = llink; consume(); - emitwbrk(); + // emitwbrk(); break; case '\t': lex = lcodeblock; @@ -140,7 +140,7 @@ lnewline(void) break; default: lex = lword; - emitwbrk(); + // emitwbrk(); } } @@ -156,16 +156,17 @@ lword(void) break; case '\n': lex = lnewline; + s_putc(tok.s, c); consume(); tok.type = TWORD; emit(); tok.type = TUNDEF; break; - case ' ': - lex = lspace; - s_putc(tok.s, c); - consume(); - break; + // case ' ': + // lex = lspace; + // s_putc(tok.s, c); + // consume(); + // break; case '[': lex = llink; tok.type = TWORD;