Sha256: 075e1afb68d8754e55d9538dac8448f5db7bbbae721d19beb999ebbeaf7a7c5f

Contents?: true

Size: 484 Bytes

Versions: 5

Compression:

Stored size: 484 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(/\n/g, "\\n")
    .replace(/'/g, "\\'");
};

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

Literal.prototype.__proto__ = Node.prototype;

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
stylus-source-0.27.1 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.27.0 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.26.1 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.26.0 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js
stylus-source-0.25.0 vendor/node_modules/mocha/node_modules/jade/lib/nodes/literal.js