Support literal quotes in titles - smu - smu - simple markup (Markdown) process… | |
git clone git://git.codemadness.org/smu | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 68edb1b8fdf4596a379712264e23d6412ff41ddb | |
parent a9636129ccb0ee70d2795ad05c41770ba57aae73 | |
Author: Karl Bartel <[email protected]> | |
Date: Sun, 29 Sep 2019 18:46:41 +0200 | |
Support literal quotes in titles | |
I could not find this in the markdown spec, but | |
https://github.com/michelf/mdtest/blob/master/Markdown.mdtest/Literal%20quotes%… | |
includes it in the test suite and I actually prefer the implementation | |
after this change. | |
Diffstat: | |
M smu.c | 5 +++-- | |
1 file changed, 3 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/smu.c b/smu.c | |
@@ -277,9 +277,10 @@ dolink(const char *begin, const char *end, int newblock) { | |
title = p + 1; | |
/* strip trailing whitespace */ | |
for(linkend = p; linkend > link && isspace(*(linkend - 1)); li… | |
- if(!(p = strchr(title, sep)) || q > end || p > q) | |
+ for(titleend = q - 1; titleend > link && isspace(*(titleend));… | |
+ if(*titleend != sep) { | |
return 0; | |
- titleend = p; | |
+ } | |
} | |
else { | |
linkend = q; |