     output = escapeHTML(output);
     # Convert ANSI escape sequences (ex. colors) to HTML
     output = @ansiConvert.toHtml(output);
-
     return output;

              if match?
                any_match = true
                #console.log(["expr match", match, remaining])
                line_exprs.push match.pre
                obj = $$ -> @span {class: pattern.config.name}, => @raw(match.match)
                obj.name = pattern.config.name
                line_exprs.push obj
                remaining = match.post
                break # process remaining
        if any_match
          continue # next part
        if remaining.length >= 0
          line_exprs.push remaining
      else
        line_exprs.push part

    if line_exprs.length == 0
      line_exprs = [line]

    #console.log(["line_exprs", line_exprs])
    #console.log(">> " + line_processed)

    ##### replace all objects in line for whole-line matching
    line_processed = ""
    for part in line_exprs
      if typeof part == "string"
        line_processed += part
      else
        line_processed += "<" + part.name + ">"
    #console.log("== " + line_processed)

    ##### whole-line matching
    for pattern in @patterns
      if pattern.config.isLineExpression
        match = line_processed.match(pattern.regex)
        if match?
          #console.log(["line match", match.match, line_processed])
          line_span = $$ -> @span {class: pattern.config.name}
          for part in line_exprs
            if typeof part == "string"
              line_span.append $$ -> @text(part)
            else

    #@outputPanel.append @sanitizeOutput(line) + "<br>"

    ##### process path patterns
    line_parts = []
    remaining = line
    any_match = true
    while remaining.length > 0 and any_match
