aboutsummaryrefslogtreecommitdiffhomepage
path: root/ide
diff options
context:
space:
mode:
authorGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-02-09 03:12:18 +0100
committerGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-03-21 15:51:49 +0100
commit66a245d8055923f8807ae42ed938c1d992051749 (patch)
tree657995f140f59725edd7ecc35325806d0e8a6992 /ide
parent00b1ceb18db39334a357784a114e45a9012cf594 (diff)
[pp] Fix bug in richpp Format use.
Format requires a top-level box to be present, this is similar to the fix done in `Pp.string_of_ppcmds`.
Diffstat (limited to 'ide')
-rw-r--r--ide/richpp.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/ide/richpp.ml b/ide/richpp.ml
index ecf1f4021..522a3e0b3 100644
--- a/ide/richpp.ml
+++ b/ide/richpp.ml
@@ -104,9 +104,11 @@ let rich_pp width ppcmds =
(** The whole output must be a valid document. To that
end, we nest the document inside <pp> tags. *)
+ pp_open_box ft 0;
pp_open_tag ft "pp";
Pp.(pp_with ft ppcmds);
pp_close_tag ft ();
+ pp_close_box ft ();
(** Get the resulting XML tree. *)
let () = pp_print_flush ft () in