docs/static/kute-page_files/app.e653d17f57bebeb097ee.js
function ansiHTML (text) {
  // Returns the text if the string has no ANSI escape code.
  if (!_regANSI.test(text)) {
    return text
  }

  // Cache opened sequence.
  var ansiCodes = []
  // Replace with markup.
  var ret = text.replace(/\033\[(\d+)*m/g, function (match, seq) {
    var ot = _openTags[seq]
    if (ot) {
      // If current sequence has been opened, close it.
      if (!!~ansiCodes.indexOf(seq)) { // eslint-disable-line no-extra-boolean-cast
        ansiCodes.pop()
        return '</span>'
      }
      // Open tag.
      ansiCodes.push(seq)
      return ot[0] === '<' ? ot : '<span style="' + ot + ';">'
    }

    var ct = _closeTags[seq]
    if (ct) {
      // Pop sequence
      ansiCodes.pop()
      return ct
    }
    return ''
  })

  // Make sure tags are closed.
  var l = ansiCodes.length
  ;(l > 0) && (ret += Array(l + 1).join('</span>'))

  return ret
}
function ansiHTML (text) {
  // Returns the text if the string has no ANSI escape code.
  if (!_regANSI.test(text)) {
    return text
  }

  // Cache opened sequence.
  var ansiCodes = []
  // Replace with markup.
  var ret = text.replace(/\033\[(\d+)*m/g, function (match, seq) {
    var ot = _openTags[seq]
    if (ot) {
      // If current sequence has been opened, close it.
      if (!!~ansiCodes.indexOf(seq)) { // eslint-disable-line no-extra-boolean-cast
        ansiCodes.pop()
        return '</span>'
      }
      // Open tag.
      ansiCodes.push(seq)
      return ot[0] === '<' ? ot : '<span style="' + ot + ';">'
    }

    var ct = _closeTags[seq]
    if (ct) {
      // Pop sequence
      ansiCodes.pop()
      return ct
    }
    return ''
  })

  // Make sure tags are closed.
  var l = ansiCodes.length
  ;(l > 0) && (ret += Array(l + 1).join('</span>'))

  return ret
}
function ansiHTML ( text ) { // Returns the text if the string has no ANSI escape code. if ( ! _regANSI . test ( text ) ) { return text } // Cache opened sequence. var ansiCodes = [ ] // Replace with markup. var ret = text . replace ( / \033\[(\d+)*m / g , function ( match , seq ) { var ot = _openTags [ seq ] if ( ot ) { // If current sequence has been opened, close it. if ( ! ! ~ ansiCodes . indexOf ( seq ) ) { // eslint-disable-line no-extra-boolean-cast ansiCodes . pop ( ) return '</span>' } // Open tag. ansiCodes . push ( seq ) return ot [ 0 ] === '<' ? ot : '<span style="' + ot + ';">' } var ct = _closeTags [ seq ] if ( ct ) { // Pop sequence ansiCodes . pop ( ) return ct } return '' } ) // Make sure tags are closed. var l = ansiCodes . length ; ( l > 0 ) && ( ret += Array ( l + 1 ) . join ( '</span>' ) ) return ret }
Converts text with ANSI color codes to HTML markup.
@param {String} text
@returns {*}
Converts text with ANSI color codes to HTML markup .