def run_pandoc
      command = unless @input_files.nil? || @input_files.empty?
        "#{@@pandoc_path} #{@input_files} #{@option_string}"
      else
        "#{@@pandoc_path} #{@option_string}"
      end
      output = error = exit_status = nil
      options = {}
      options[:stdin_data] = @input_string if @input_string
      output, error, exit_status = Open3.capture3(command, **options)
      raise error unless exit_status && exit_status.success?
      output
    end
def run_pandoc
      command = unless @input_files.nil? || @input_files.empty?
        "#{@@pandoc_path} #{@input_files} #{@option_string}"
      else
        "#{@@pandoc_path} #{@option_string}"
      end
      output = error = exit_status = nil
      options = {}
      options[:stdin_data] = @input_string if @input_string
      output, error, exit_status = Open3.capture3(command, **options)
      raise error unless exit_status && exit_status.success?
      output
    end
Wrapper to run pandoc in a consistent, DRY way