   o.html()
 
 resolveImagePaths = (html, filePath) ->
+  return html unless html
+
   [rootDirectory] = atom.project.relativizePath(filePath)
   o = cheerio.load(html)
   for imgElement in o('img')

        """

sanitize = (html) ->
  o = cheerio.load(html)
  o('script').remove()
  attributesToRemove = [

    task = Task.once taskPath, text, attributes

    task.on 'asciidoctor-render:success', ({html}) ->
      console.warn "Rendering is empty: #{filePath}" if not html
      resolve html or ''

    task.on 'asciidoctor-render:error', ({code, errno, syscall, stack}) ->
      resolve """
