Comparing version 0.1.7 to 0.1.8
// Generated by CoffeeScript 1.9.0 | ||
(function() { | ||
var ansi_vt100_cc_matcher, rgb_hex_by_vt100_colorcode; | ||
var CND, ansi_vt100_cc_matcher, rgb_hex_by_vt100_colorcode; | ||
CND = require('./main'); | ||
rgb_hex_by_vt100_colorcode = { | ||
@@ -306,3 +308,3 @@ '0': '000000', | ||
this._as_html = function(text, options) { | ||
var R, chunk, css_class, css_prefix, is_ansicode, n, open_span_count, vt100_clear, vt100_reset, _i, _j, _len, _ref; | ||
var R, chunk, color_code, css_class, css_prefix, is_ansicode, n, open_span_count, vt100_clear, vt100_reset, _i, _j, _len, _ref; | ||
is_ansicode = true; | ||
@@ -319,2 +321,3 @@ R = []; | ||
if (is_ansicode) { | ||
color_code = chunk[chunk.length - 1]; | ||
css_class = css_prefix.concat('-', chunk.join('-')); | ||
@@ -325,3 +328,3 @@ if (css_class === vt100_reset || css_class === vt100_clear) { | ||
} else { | ||
R.push("<span class='" + css_class + "'>"); | ||
R.push("<span style='color:#" + rgb_hex_by_vt100_colorcode[color_code] + ";'>"); | ||
open_span_count += 1; | ||
@@ -333,3 +336,3 @@ } | ||
/* TAINT must escape */ | ||
R.push(chunk); | ||
R.push(CND.escape_html(chunk)); | ||
} | ||
@@ -336,0 +339,0 @@ } |
// Generated by CoffeeScript 1.9.0 | ||
(function() { | ||
var ANALYZER, TYPES, badge, color_code, color_name, effect_name, effect_names, effect_off, effect_on, isa_text, lines_from_stdout, rainbow_color_names, rainbow_idx, _fn, _fn1, _ref, _rpr, | ||
var TYPES, badge, color_code, color_name, effect_name, effect_names, effect_off, effect_on, isa_text, lines_from_stdout, rainbow_color_names, rainbow_idx, _fn, _fn1, _ref, _rpr, | ||
__slice = [].slice; | ||
@@ -20,3 +20,3 @@ | ||
ANALYZER = require('./TRM-VT100-ANALYZER'); | ||
this.ANSI = require('./TRM-VT100-ANALYZER'); | ||
@@ -370,8 +370,2 @@ this.rpr = function(x) { | ||
this.as_html = ANALYZER.as_html.bind(ANALYZER); | ||
this.get_css_source = ANALYZER.get_css_source.bind(ANALYZER); | ||
this.analyze = ANALYZER.analyze.bind(ANALYZER); | ||
this.clean = function(text) { | ||
@@ -378,0 +372,0 @@ var R, chunk, is_ansicode; |
{ | ||
"name": "cnd", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"description": "a grab-bag NodeJS package mainly for functionalities that used to live in coffeenode-trm, coffeenode-bitsnpieces, and coffeenode-types", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
144385
1748