diff --git a/src/plugins/server/jbuffer.ml b/src/plugins/server/jbuffer.ml index 70e5d66af55ac68ad3b4d464a644f168d18f6073..d354dc8bc22d5c498edde315774d822fb376289b 100644 --- a/src/plugins/server/jbuffer.ml +++ b/src/plugins/server/jbuffer.ml @@ -40,7 +40,8 @@ let flush buffer () = buffer.rjson <- js :: buffer.rjson ; FCBuffer.clear t -let push_tag buffer tag = +let push_tag buffer stag = + let tag = Transitioning.Format.string_of_stag stag in flush buffer () ; buffer.stack <- ( tag , buffer.rjson ) :: buffer.stack ; buffer.rjson <- [] @@ -83,15 +84,15 @@ let create ?indent ?margin () = Format.pp_set_max_indent fmt (max 0 (min k (m-10))) end ; begin - let open Format in - pp_set_formatter_tag_functions fmt { - print_open_tag = no_mark ; - print_close_tag = no_mark ; - mark_open_tag = mark_open_tag buffer ; - mark_close_tag = mark_close_tag buffer ; + let open Transitioning.Format in + pp_set_formatter_stag_functions fmt { + print_open_stag = no_mark ; + print_close_stag = no_mark ; + mark_open_stag = mark_open_tag buffer ; + mark_close_stag = mark_close_tag buffer ; } ; - pp_set_print_tags fmt false ; - pp_set_mark_tags fmt true ; + Format.pp_set_print_tags fmt false ; + Format.pp_set_mark_tags fmt true ; end ; buffer diff --git a/src/plugins/server/jbuffer.mli b/src/plugins/server/jbuffer.mli index 3e1e02a1beae8615cf925e52b980b093749766c1..70d9062f0e5d69d7585289234f4de97f0625049c 100644 --- a/src/plugins/server/jbuffer.mli +++ b/src/plugins/server/jbuffer.mli @@ -46,8 +46,8 @@ val bprintf : buffer -> ('a,Format.formatter,unit) format -> 'a val append : buffer -> string -> int -> int -> unit val flush : buffer -> unit -> unit -val push_tag : buffer -> Format.tag -> unit -val pop_tag : buffer -> Format.tag -> unit +val push_tag : buffer -> Transitioning.Format.stag -> unit +val pop_tag : buffer -> Transitioning.Format.stag -> unit (** Flushes the buffer and returns its JSON enoding. This pops all pending tags. *)