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%20in%20titles.text includes it in the test suite and I actually prefer the implementation after this change.
This commit is contained in:
parent
a9636129cc
commit
68edb1b8fd
1 changed files with 3 additions and 2 deletions
5
smu.c
5
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)); linkend--);
|
||||
if(!(p = strchr(title, sep)) || q > end || p > q)
|
||||
for(titleend = q - 1; titleend > link && isspace(*(titleend)); titleend--);
|
||||
if(*titleend != sep) {
|
||||
return 0;
|
||||
titleend = p;
|
||||
}
|
||||
}
|
||||
else {
|
||||
linkend = q;
|
||||
|
|
Loading…
Add table
Reference in a new issue