 
   # If the document is immediately followed by comment which is followed by newlines,
   # its newlines wouldn't have considered the comment, so we need to adjust it.
-  defp adjust_trailing_newlines({doc, next_line, newlines}, doc_end, [{line, _, _} | _])
+  defp adjust_trailing_newlines({doc, next_line, newlines}, doc_end, [%{line: line} | _])
        when newlines > 1 and line == doc_end + 1 do
     {doc, next_line, 1}
   end

      (
        min_line = line(meta)
        max_line = closing_line(meta)
        Enum.any?(comments, fn {line, _, _} -> line > min_line and line < max_line end)
      )
  end


        {{_, arg_meta, _}, _} = hd(arg)
        first_line = line(arg_meta)

        case Enum.drop_while(comments, fn %{line: line} -> line <= block_line end) do
          [%{line: line} | _] when line <= first_line ->
            {false, block}

          _ ->
