change it so titles don't require the exact amount bytes/columns of - and = - smu - smu - simple markup (Markdown) processor (fork, fixes + features)
(HTM) git clone git://git.codemadness.org/smu
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit d58759a6f00ab596d7238a22b07395e2d186ec19
(DIR) parent 0c366f57600669cba8cff413d080f58304073a3f
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 11 May 2021 17:59:27 +0200
change it so titles don't require the exact amount bytes/columns of - and =
This would be a bit unintuitive too when using unicode or multiwidth/column
characters in titles.
Diffstat:
M smu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/smu.c b/smu.c
@@ -605,7 +605,7 @@ dounderline(const char *begin, const char *end, int newblock)
for (i = 0; i < LENGTH(underline); i++) {
for (j = 0; p + j != end && p[j] != '\n' && p[j] == underline[i].search[0]; j++)
;
- if (j >= l) {
+ if (j > 0) {
fputs(underline[i].before, stdout);
if (underline[i].process)
process(begin, begin + l, 0);