Introduction
Introduction Statistics Contact Development Disclaimer Help
Skip empty lines at end of code block - smu - smu - simple markup (Markdown) pr…
git clone git://git.codemadness.org/smu
Log
Files
Refs
README
LICENSE
---
commit b76e431cc2aaf15e55b0f349cdb5df0f87759cbe
parent 3e00caedeb16cdc3bb0740e2592064bf1823f7ad
Author: Karl Bartel <[email protected]>
Date: Sun, 29 Sep 2019 17:27:56 +0200
Skip empty lines at end of code block
See https://spec.commonmark.org/0.29/#example-87
Diffstat:
M smu.c | 6 ++++++
1 file changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/smu.c b/smu.c
@@ -219,6 +219,12 @@ dolineprefix(const char *begin, const char *end, int newbl…
p += l;
}
}
+
+ /* Skip empty lines in block */
+ while(*(buffer + j - 1) == '\n') {
+ j--;
+ }
+
ADDC(buffer, j) = '\0';
if(lineprefix[i].process)
process(buffer, buffer + strlen(buffer), lineprefix[i]…
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.