       if not wrap or line.length <= @options.wrapLength
         output.writeln prefix + line
       else
-        lines = this.breakLine line
+        lines = @breakLine line
         if lines.length is 1
           output.writeln prefix + line
         else
           lines.forEach (line) =>
-            this.writeTextLine line, output, pipe, trim, wrap
+            @writeTextLine line, output, pipe, trim, wrap
   
   breakLine: (line) ->
     if line and line.length > 0

      if docTypeName?
        output.writeln '!!! ' + docTypeName

    this.element document.documentElement, output

  element: (node, output) ->
    return if not node?.tagName
    tagName = node.tagName.toLowerCase()
    tagHead = @helper.tagHead node
    tagAttr = @helper.tagAttr node

    
  writeTextContent: (node, output, pipe = true, trim = true, wrap = true) ->
    output.enter()
    @forEachChild node, (child) =>
      @writeText child, output, pipe, trim, wrap
    output.leave()


  writeText: (node, output, pipe = true, trim = true, wrap = true, escapeFirstChar = false) ->
    if node.nodeType is 3
      data = node.data or ''
      if data.length > 0
        lines = data.split(/\r|\n/)
        lines.forEach (line) =>
          @writeTextLine line, output, pipe, trim, wrap
              
  writeTextLine: (line, output, pipe = true, trim = true, wrap = true) ->
    prefix = if pipe then '| ' else ''
