   end
 
   defp parse_code(<<"\"\"\""::utf8, t::binary>>, acc, replacement, empty_line_replacement) do
-    parse_heredoc(t, acc <> ~s("""), replacement, empty_line_replacement, ~s("""))
+    parse_heredoc(
+      t,
+      acc <> ~s("""),
+      replacement,
+      empty_line_replacement,
+      ~s("""),
+      "",
+      byte_size(acc <> ~s("""))
+    )
   end
 
   defp parse_code(<<"\'\'\'"::utf8, t::binary>>, acc, replacement, empty_line_replacement) do
-    parse_heredoc(t, acc <> ~s('''), replacement, empty_line_replacement, ~s('''))
+    parse_heredoc(
+      t,
+      acc <> ~s('''),
+      replacement,
+      empty_line_replacement,
+      ~s('''),
+      "",
+      byte_size(acc <> ~s('''))
+    )
   end
 
   defp parse_code(<<"\\\""::utf8, t::binary>>, acc, replacement, empty_line_replacement) do

           acc,
           unquote(sigil_end),
           replacement,
           empty_line_replacement
         ) do
      parse_removable_heredoc_sigil(
        t,
        acc <> replacement,
        unquote(sigil_end),
        replacement,
        empty_line_replacement
      )
    end
  end

         acc,
         replacement,
         empty_line_replacement,
         "\'\'\'",
         current_line,
         byte_index_start
       ) do
    acc = pad_replaced_heredoc(acc, ~s('''), current_line, byte_index_start)

    parse_code(t, acc <> ~s('''), replacement, empty_line_replacement)
  end
