           unless element.parentNode.firstChild is element
             @appendStringWithAttributes(" | ")
 
+  # Document construction
+
   appendBlockForAttributesWithElement: (attributes, element) ->
     @blockElements.push(element)
     block = blockForAttributes(attributes)


  removeHiddenContainer: ->
    @containerElement.parentNode.removeChild(@containerElement)

  processNode: (node) ->
    switch node.nodeType


  getDocument: ->
    Trix.Document.fromJSON(@blocks)

  # HTML parsing

  parse: ->
    try
