Introduction
Introduction Statistics Contact Development Disclaimer Help
Lists only continue when using same marker - smu - smu - simple markup (Markdow…
git clone git://git.codemadness.org/smu
Log
Files
Refs
README
LICENSE
---
commit 028a8dadd1f61f5b773b773b022ad2ccb86e3ddc
parent 7fa950993c6d6deafe7787547951abdcec6e1a55
Author: Karl Bartel <[email protected]>
Date: Wed, 2 Oct 2019 13:07:03 +0200
Lists only continue when using same marker
```
- foo
- bar
+ baz
```
is two lists (see https://spec.commonmark.org/0.29/#example-271)
Diffstat:
M smu.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/smu.c b/smu.c
@@ -327,6 +327,7 @@ dolist(const char *begin, const char *end, int newblock) {
unsigned int i, j, indent, run, ul, isblock;
const char *p, *q;
char *buffer = NULL;
+ char marker;
isblock = 0;
if(newblock)
@@ -336,9 +337,10 @@ dolist(const char *begin, const char *end, int newblock) {
else
return 0;
q = p;
- if(*p == '-' || *p == '*' || *p == '+')
+ if(*p == '-' || *p == '*' || *p == '+') {
ul = 1;
- else {
+ marker = *p;
+ } else {
ul = 0;
for(; p < end && *p >= '0' && *p <= '9'; p++);
if(p >= end || *p != '.')
@@ -368,7 +370,7 @@ dolist(const char *begin, const char *end, int newblock) {
}
q = p + 1;
j = 0;
- if(ul && (*q == '-' || *q == '*' || *q == '+'))
+ if(ul && *q == marker)
j = 1;
else if(!ul) {
for(; q + j != end && q[j] >= '0' && q…
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.