INNER CODE UNIT · JavaScript

Node

astefanutti/kubebox · index.js:15

        const Node = function (options) {
          theme(this, options);
          return module.call(this, options);
        }
        Node.prototype = module.prototype;
        return Node;
      }
      return module;
    }
  };
  // override tags parsing
  const blessed = require('blessed');
  const _parseTags = blessed.Element.prototype._parseTags;
  blessed.Element.prototype._parseTags = function (text) {
    if (!this.parseTags) return text;
    if (!/{\/?[\w\-,;!#]*}/.test(text)) return text;

    return _parseTags.call(this, text.replace(/\{(\/)?grey-fg\}/g, '{$1white-fg}'));

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…