   config = loadOutputYAML md, config
   text = matter.stringify(text, config)
   args = []
-
-  console.log config
 
   extension = null
   outputConfig = null

path = require 'path'
fs = require 'fs'
{execFile} = require 'child_process'
matter = require('gray-matter')
# temp = require 'temp'

getFileExtension = (documentType)->
  if documentType == 'pdf_document'


  console.log args.join(' ')

  # change link path to relative path
  text = processPaths text, path.dirname(outputFilePath), md.projectDirectoryPath, md.rootDirectoryPath

  # change working directory
  cwd = process.cwd()
  process.chdir(path.dirname(outputFilePath))

  program = execFile 'pandoc', args, (err)->
    process.chdir(cwd) # change cwd back
    throw err if err
    atom.notifications.addInfo "File #{path.basename(outputFilePath)} was created", detail: "path: #{outputFilePath}"
  program.stdin.end(text)

module.exports = pandocConvert
