anchor.diff:    #block_scalar_ctx{style = literal, spaces = Spaces} = Ctx) ->
       Parser1 = warn_if_non_ascii_line_break(Chars, Line, Col, Parser),
       {Col1, Delta1} = ?NEXT_COL(Col, Delta, 1),
  +    Output1 = case Spaces of
  +        "" -> [C | Ctx#block_scalar_ctx.output];
  +        _  -> [C | Spaces ++ Ctx#block_scalar_ctx.output]
  +    end,
       Ctx1 = Ctx#block_scalar_ctx{
         spaces  = "",
         newline = false,
  -      output  = [C | Spaces ++ Ctx#block_scalar_ctx.output],
  +      output  = Output1,
         endline = Line,
         endcol  = Col1
       },
  
positive.code:   #flow_scalar_ctx{style = double_quoted,
    spaces = Spaces} = Ctx) ->
      {Col1, Delta1} = ?NEXT_COL(Col, Delta, 1),
      Ctx1 = Ctx#flow_scalar_ctx{
        spaces       = "",
        newline      = false,
        output       = Spaces ++ Ctx#flow_scalar_ctx.output
      },
      do_parse_flow_scalar_escaped(Rest, Line, Col1, Delta1, Parser, Ctx1);
  
  
negative.code:   when not ?IS_SPACE(C) orelse
    (?IS_SPACE(C) andalso (not Newline orelse Output == "")) ->
      {Col1, Delta1} = ?NEXT_COL(Col, Delta, 1),
      Output1 = case Spaces of
          "" -> [C | Ctx#block_scalar_ctx.output];
          _  -> [C | Spaces ++ Ctx#block_scalar_ctx.output]
      end,
      Ctx1 = Ctx#block_scalar_ctx{
        spaces  = "",
        newline = false,
        output  = Output1,
        endline = Line,
        endcol  = Col1
      },
  