# File lib/org-ruby/markdown_output_buffer.rb, line 78
    def flush!
      return false if @buffer.empty? and @output_type != :blank
      @logger.debug "FLUSH ==========> #{@output_type}"
      @buffer.gsub!(/\A\n*/, "")

      case
      when mode_is_code?(current_mode)
        @output << "```#{@block_lang}\n"
        @output << @buffer << "\n"
        @output << "```\n"
      when preserve_whitespace?
        @output << @buffer << "\n"

      when @output_type == :blank
        @output << "\n"

      else
        case current_mode
        when :paragraph
          @output << "> " if @mode_stack[0] == :quote

        when :list_item
          @output << " " * @mode_stack.count(:list_item) << "* "

        when :horizontal_rule
          @output << "---"

        end
        @output << inline_formatting(@buffer) << "\n"
      end
      @buffer = ""
    end