     task = Task.once taskPath, text, attributes
 
     task.on 'asciidoctor-render:success', ({html}) ->
-      resolve html
+      console.warn "Rendering is empty: #{filePath}" if not html
+      resolve html or ''
 
     task.on 'asciidoctor-render:error', ({code, errno, syscall, stack}) ->
       resolve """

        """

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

  o.html()

resolveImagePaths = (html, filePath) ->
  return html unless html

  [rootDirectory] = atom.project.relativizePath(filePath)
  o = cheerio.load(html)
  for imgElement in o('img')
