 #
-# grunt-md-templator
-# https://github.com/realyze/grunt-md-templator
+# grunt-markdown-jade
+# https://github.com/realyze/grunt-markdown-jade
 #
 # Copyright (c) 2013 Tomas Brambora
 # Licensed under the MIT license.

  beautifyHTML = require('js-beautify').html
  Entities = require('html-entities').AllHtmlEntities
  {decode} = new Entities()


  # Global options hash.

      # changing data object.
      getHTML = (data) -> _.union(['html'], JSON.parse JSON.stringify data)

      metadata = getMetadata data

      root.children.push
        id: metadata.id
        metadata: metadata
        content: markdown.renderJsonML(getHTML data)
        header: markdown.renderJsonML(getHTML [data[0]])
        body: markdown.renderJsonML(getHTML _.rest(data))
