anchor.diff:  
   %% @private
   emit_mf_prologue(Fd, #'MetricFamily'{name=Name, help=Help, type=Type}) ->
  -  Bytes = io_lib:format("# TYPE ~s ~s\n# HELP ~s ~s\n",
  -                        [Name, string_type(Type),
  -                         Name, escape_metric_help(Help)]),
  +  Bytes = ["# TYPE ", Name, " ", string_type(Type), "\n# HELP ",
  +           Name, " ", escape_metric_help(Help), "\n"],
     file:write(Fd, Bytes).
   
   %% @private
  
positive.code: labels_string([])     -> "";
  labels_string(Labels) ->
    Fun = fun (#'LabelPair'{name=Name, value=Value}) ->
              io_lib:format("~s=\"~s\"", [Name, escape_label_value(Value)])
          end,
    "{" ++ string:join(lists:map(Fun, Labels), ",") ++ "}".
  
  emit_series(Fd, Name, Labels, undefined) ->
    LString = labels_string(Labels),
    file:write(Fd, io_lib:format("~s" ++ LString ++ " NaN\n", [Name]));
  emit_series(Fd, Name, Labels, Value) ->
    LString = labels_string(Labels),
    file:write(Fd, io_lib:format("~s" ++ LString ++ " ~p\n", [Name, Value])).
  
  %% @private
  escape_metric_help(Help) ->
    sub(sub(Help, "\\", "\\\\\\\\"), "\n", "\\\\n").
  
  bound_to_label_value(Bound) when is_number(Bound) ->
    Bound;
  bound_to_label_value(infinity) ->
    "+Inf".
  
  
negative.code:   ?ESCAPE_LVALUE(LValue);
  escape_label_value(LValue) when is_binary(LValue) ->
    ?ESCAPE_LVALUE(LValue);
  escape_label_value(Value) ->
    erlang:error({wtf, Value}).
  
  
  -spec sub(iodata(), string(), string()) -> string().
  sub(Str, Old, New) ->
  