Sha256: 1d7f57652c54bb5e3ceebca369b78a93fad2bf542d7282cac735f85bda669b5f

Contents?: true

Size: 517 Bytes

Versions: 38

Compression:

Stored size: 517 Bytes

Contents

/*!
 * Jade - nodes - Literal
 * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
 * MIT Licensed
 */

/**
 * Module dependencies.
 */

var Node = require('./node');

/**
 * Initialize a `Literal` node with the given `str.
 *
 * @param {String} str
 * @api public
 */

var Literal = module.exports = function Literal(str) {
  this.str = str
    .replace(/\\/g, "\\\\")
    .replace(/\n|\r\n/g, "\\n")
    .replace(/'/g, "\\'");
};

/**
 * Inherit from `Node`.
 */

Literal.prototype.__proto__ = Node.prototype;

Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
stylus-source-0.49.3 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
snowball-0.1.22 node_modules/jade/lib/nodes/literal.js
stylus-source-0.42.2 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.42.1 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.42.0 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.41.3 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.41.2 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.41.1 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.41.0 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.40.3 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.40.2 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.40.1 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.40.0 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.39.4 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.39.3 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.39.2 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.39.1 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.39.0 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.38.0 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.37.0 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js