 commonmark = require 'commonmark'
-toMarkdown = require('to-markdown').toMarkdown
+toMarkdown = require('to-markdown')
 
 ### Rewrite all of this to first generate CommonMark AST and then generate
 HTML or Markdown from that.

    if context.listLevel > 0
      context.listLevel--

  @visitUNORDERED: (item, context) ->
    context.listLevel++
    indent(context.listLevel - 1) + '- ' + toMarkdown item.bodyHTML

  @didVisitUNORDERED: (item, context) ->
    if context.listLevel > 0
      context.listLevel--

module.exports = FTToMarkdown.outlineToMarkdown.bind(FTToMarkdown)
###
  @visitBLOCKQUOTE: (item, context) ->
    indent(context.listLevel) + '> ' + toMarkdown item.bodyHTML

  @visitHEADER: (item, context) ->
    context.listIndex = 0
    context.listLevel = 0
    context.headerLevel++
    repeat('#', context.headerLevel) + ' ' + toMarkdown item.bodyHTML

  @didVisitHEADER: (item, context) ->
    context.headerLevel--


  @visitORDERED: (item, context) ->
