From: Michael Göhler Date: Sun, 14 Jan 2018 13:29:15 +0000 (+0100) Subject: set line->size to correct value when stripping trailing spaces, fixes #123 X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=6d881eb6228ea504323d8acabbe3774c64996571;p=smdp.git set line->size to correct value when stripping trailing spaces, fixes #123 --- diff --git a/include/main.h b/include/main.h index 7b21482..df192b7 100644 --- a/include/main.h +++ b/include/main.h @@ -25,6 +25,6 @@ #define MDP_VER_MAJOR 1 #define MDP_VER_MINOR 0 -#define MDP_VER_REVISION 11 +#define MDP_VER_REVISION 12 #endif // !defined( MAIN_H ) diff --git a/src/parser.c b/src/parser.c index 615cc6e..906cb45 100644 --- a/src/parser.c +++ b/src/parser.c @@ -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 &&