set line->size to correct value when stripping trailing spaces, fixes #123
[smdp.git] / src / parser.c
index 615cc6e..906cb45 100644 (file)
@@ -481,6 +481,7 @@ int markdown_analyse(cstring_t *text, int prev) {
 
     // strip trailing spaces
     for(eol = text->size; eol > offset && iswspace(text->value[eol - 1]); eol--);
+    text->size = eol;
 
     // IS_UNORDERED_LIST_#
     if(text->size >= offset + 2 &&