You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
typesetting/pitfall/pdfkit/node_modules/jade/lib/nodes/text.js

27 lines
460 B
JavaScript

7 years ago
'use strict';
var Node = require('./node');
/**
* Initialize a `Text` node with optional `line`.
*
* @param {String} line
* @api public
*/
var Text = module.exports = function Text(line) {
this.val = '';
if ('string' == typeof line) this.val = line;
};
// Inherit from `Node`.
Text.prototype = Object.create(Node.prototype);
Text.prototype.constructor = Text;
Text.prototype.type = 'Text';
/**
* Flag as text.
*/
Text.prototype.isText = true;