How to use the ansi_up.linkify function in ansi_up

To help you get started, we’ve selected a few ansi_up examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DeviaVir / zenbot / db / logs.js View on Github external
load: function (obj, opts, cb) {
      // respond after the obj is loaded
      obj.html = ansi_up.linkify(ansi_up.ansi_to_html(ansi_up.escape_for_html(obj.line), {use_classes: true}))
      cb(null, obj);
    },
    save: function (obj, opts, cb) {
github drone / drone-ui / src / components / term_row.js View on Github external
render() {
    const {pos, out} = this.props.line;

    let html = ansi_up.escape_for_html(out || '');
    html = ansi_up.ansi_to_html(html, opts);
    html = ansi_up.linkify(html);

    return (
     <div></div>
    );
  }
}

ansi_up

Convert ansi sequences in strings to colorful HTML

MIT
Latest version published 11 months ago

Package Health Score

64 / 100
Full package analysis