# File lib/asciidoctor/document.rb, line 1081
  def write output, target
    if Writer === @converter
      @converter.write output, target
    else
      if target.respond_to? :write
        unless output.nil_or_empty?
          target.write output.chomp
          # ensure there's a trailing endline
          target.write LF
        end
      else
        ::IO.write target, output
      end
      nil
    end
  end