Skip empty lines at end of code block
See https://spec.commonmark.org/0.29/#example-87
This commit is contained in:
parent
3e00caedeb
commit
b76e431cc2
1 changed files with 6 additions and 0 deletions
6
smu.c
6
smu.c
|
@ -219,6 +219,12 @@ dolineprefix(const char *begin, const char *end, int newblock) {
|
||||||
p += l;
|
p += l;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Skip empty lines in block */
|
||||||
|
while(*(buffer + j - 1) == '\n') {
|
||||||
|
j--;
|
||||||
|
}
|
||||||
|
|
||||||
ADDC(buffer, j) = '\0';
|
ADDC(buffer, j) = '\0';
|
||||||
if(lineprefix[i].process)
|
if(lineprefix[i].process)
|
||||||
process(buffer, buffer + strlen(buffer), lineprefix[i].process >= 2);
|
process(buffer, buffer + strlen(buffer), lineprefix[i].process >= 2);
|
||||||
|
|
Loading…
Add table
Reference in a new issue