From eb1d5c49a5aaaf031031d6ba4dc43ea1f30c05d8 Mon Sep 17 00:00:00 2001 From: "Fletcher T. Penney" Date: Fri, 26 May 2017 09:07:52 -0400 Subject: [PATCH] FIXED: Fix regression and add newline at end of converted strings --- Sources/libMultiMarkdown/mmd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/libMultiMarkdown/mmd.c b/Sources/libMultiMarkdown/mmd.c index 6eab95c..6bf559a 100644 --- a/Sources/libMultiMarkdown/mmd.c +++ b/Sources/libMultiMarkdown/mmd.c @@ -2133,6 +2133,9 @@ char * mmd_engine_convert(mmd_engine * e, short format) { mmd_engine_export_token_tree(output, e, format); + // Add newline to result + d_string_append_c(output, '\n'); + result = output->str; d_string_free(output, false); @@ -2245,6 +2248,8 @@ DString * mmd_engine_convert_to_data(mmd_engine * e, short format, const char * break; default: result = output; + // Add newline to result + d_string_append_c(result, '\n'); break; } -- 2.40.0