diff --git a/src/plugins/markdown-report/Report_markdown.mli b/src/plugins/markdown-report/Report_markdown.mli
index 5edadb17f3d262f95707642b7b094be1231d1dfe..24a5713e2e21afb9eec8c138155fa2277ab5abda 100644
--- a/src/plugins/markdown-report/Report_markdown.mli
+++ b/src/plugins/markdown-report/Report_markdown.mli
@@ -51,7 +51,9 @@ and block = block_element list
 
 and element =
   | Block of block
-  | Raw of string (** non-markdown element, printed as-is. *)
+  | Raw of string list
+   (** non-markdown. Each element of the list is printed as-is on its own line.
+       A blank line separates the [Raw] node from the next one. *)
   | Comment of string (** markdown comment, printed <!-- like this --> *)
   | H1 of text * string option (** optional label. *)
   | H2 of text * string option
diff --git a/src/plugins/markdown-report/markdown.ml b/src/plugins/markdown-report/markdown.ml
index 6996182b542aa65c87b972b2bab2cbf7127f6a96..b26a07fa8fa83d75e6b49aa32111a6c02fef714e 100644
--- a/src/plugins/markdown-report/markdown.ml
+++ b/src/plugins/markdown-report/markdown.ml
@@ -23,7 +23,9 @@ and block = block_element list
 
 and element =
   | Block of block
-  | Raw of string (** non-markdown element, printed as-is. *)
+  | Raw of string list
+   (** non-markdown. Each element of the list is printed as-is on its own line.
+       A blank line separates the [Raw] node from the next one. *)
   | Comment of string (** markdown comment, printed <!-- like this --> *)
   | H1 of text * string option (** optional label. *)
   | H2 of text * string option
@@ -169,7 +171,10 @@ and pp_quote fmt l =
 
 and pp_element fmt = function
   | Block b -> Format.fprintf fmt "@[<v>%a@]@\n" pp_block b
-  | Raw s -> Format.pp_print_string fmt s
+  | Raw l ->
+    Format.(
+      fprintf fmt "%a@\n"
+        (pp_print_list ~pp_sep:pp_force_newline pp_print_string) l)
   | Comment s ->
     Format.fprintf fmt
       "@[<hv>@[<hov 5><!-- %a@]@ -->@]@\n" Format.pp_print_text s
diff --git a/src/plugins/markdown-report/markdown.mli b/src/plugins/markdown-report/markdown.mli
index 1cedad2869972d2067b67302687b5d8b2afc54f7..dc5199989ac831c951cd992291609ea498f57149 100644
--- a/src/plugins/markdown-report/markdown.mli
+++ b/src/plugins/markdown-report/markdown.mli
@@ -23,7 +23,9 @@ and block = block_element list
 
 and element =
   | Block of block
-  | Raw of string (** non-markdown element, printed as-is. *)
+  | Raw of string list
+   (** non-markdown. Each element of the list is printed as-is on its own line.
+       A blank line separates the [Raw] node from the next one. *)
   | Comment of string (** markdown comment, printed <!-- like this --> *)
   | H1 of text * string option (** optional label. *)
   | H2 of text * string option
diff --git a/src/plugins/markdown-report/md_gen.ml b/src/plugins/markdown-report/md_gen.ml
index d3157522cc2207eaf88ca5de0a077b9fb0d43fbf..701e0e2d5551b3aa48e25a751486326787d9991b 100644
--- a/src/plugins/markdown-report/md_gen.ml
+++ b/src/plugins/markdown-report/md_gen.ml
@@ -602,9 +602,9 @@ let gen_report is_draft =
     else elements
   in
   let elements =
-   Raw "\\let\\underscore\\_" ::
-   Raw "\\renewcommand{\\_}{\\discretionary{\\underscore}{}{\\underscore}}" ::
-   elements
+   Raw [ "\\let\\underscore\\_" ;
+         "\\renewcommand{\\_}{\\discretionary{\\underscore}{}{\\underscore}}"]
+   :: elements
   in
   let doc = { title; authors; date; elements;} in
   try
@@ -621,7 +621,7 @@ let main () =
   if Mdr_params.Gen_draft.get () then begin
     if Mdr_params.Generate.get () then
       Mdr_params.warning
-        "-mdr-gen and -mdr-gen-draft can be activated at the \
+        "-mdr-gen and -mdr-gen-draft cannot be activated at the \
          same time. Only draft will be generated";
     gen_report true
   end
diff --git a/src/plugins/markdown-report/parse_remarks.ml b/src/plugins/markdown-report/parse_remarks.ml
index 3e5780cf4c130b906caa8670f214ba3d3f09117b..56b2331ccbce97145536c7e52c373d0cd841cd39 100644
--- a/src/plugins/markdown-report/parse_remarks.ml
+++ b/src/plugins/markdown-report/parse_remarks.ml
@@ -1,21 +1,21 @@
 type env =
   { mutable current_section: string;
     mutable is_markdown: bool;
-    current_markdown: Buffer.t;
+    mutable current_markdown: string list;
+    (* markdown lines of current element, in reverse order. *)
     mutable remarks: Markdown.element list Datatype.String.Map.t }
 
 let empty_env () =
   { current_section = "";
     is_markdown = false;
-    current_markdown = Buffer.create 40;
+    current_markdown = [];
     remarks = Datatype.String.Map.empty }
 
-let add_channel buf chan =
+let add_channel env chan =
   try
     while true do
       let s = input_line chan in
-      Buffer.add_string buf s;
-      Buffer.add_char buf '\n'
+      env.current_markdown <- s :: env.current_markdown;
     done;
   with End_of_file -> ()
 
@@ -33,20 +33,20 @@ let parse_line env line =
       env.remarks <-
         Datatype.String.Map.add
           env.current_section
-          [ Markdown.Raw (Buffer.contents env.current_markdown)]
-          env.remarks
+          [ Markdown.Raw (List.rev env.current_markdown)]
+          env.remarks;
+      env.current_markdown <- []
     end else if Str.string_match include_markdown line 0 then begin
       let f = Str.matched_group 1 line in
       try
         let chan = open_in f in
-        add_channel env.current_markdown chan;
+        add_channel env chan;
         close_in chan
       with Sys_error err ->
         Mdr_params.error
           "Unable to open included remarks file %s (%s), Ignoring." f err
     end else begin
-      Buffer.add_string env.current_markdown line;
-      Buffer.add_char env.current_markdown '\n'
+      env.current_markdown <- line :: env.current_markdown;
     end
   end else if Str.string_match beg_markdown line 0 then begin
     env.is_markdown <- true