Introduction
Introduction Statistics Contact Development Disclaimer Help
Handle empty lines with whitespace in lists - smu - smu - simple markup (Markdo…
git clone git://git.codemadness.org/smu
Log
Files
Refs
README
LICENSE
---
commit 2a8d5b1a6bd8f7e30dc4b932b1ab698a75497710
parent 23241209f80b4961d706b151d718e1c5b2d5c632
Author: Karl Bartel <[email protected]>
Date: Thu, 3 Oct 2019 13:24:15 +0200
Handle empty lines with whitespace in lists
Diffstat:
M smu.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/smu.c b/smu.c
@@ -371,12 +371,16 @@ dolist(const char *begin, const char *end, int newblock) {
if(*p == '\n') {
if(p + 1 == end)
break;
- else if(p[1] == '\n') {
- p++;
- ADDC(buffer, i) = '\n';
- i++;
- run = 0;
- isblock++;
+ else {
+ /* Handle empty lines */
+ for(q = p + 1; (*q == ' ' || *q == '\t…
+ if(*q == '\n') {
+ ADDC(buffer, i) = '\n';
+ i++;
+ run = 0;
+ isblock++;
+ p = q;
+ }
}
q = p + 1;
j = 0;
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.