Lines Matching +refs:text +refs:line +refs:d

347   var context = lines.slice(start, end).map(function (line, i){
352 + line;
416 exports.render = function (template, d, o) {
417 var data = d || utils.createNullProtoObjWherePossible();
510 function Template(text, opts) {
513 this.templateText = text;
698 var d = utils.shallowCopy(utils.createNullProtoObjWherePossible(), data);
700 d = utils.shallowCopy(d, includeData);
702 return includeFile(path, opts)(d);
738 var d = this.opts.delimiter;
743 matches.forEach(function (line, index) { argument
749 if ( line.indexOf(o + d) === 0 // If it is a tag
750 && line.indexOf(o + d + d) !== 0) { // and is not escaped
752 if (!(closing == d + c || closing == '-' + d + c || closing == '_' + d + c)) {
753 throw new Error('Could not find matching close tag for "' + line + '".');
756 self.scanLine(line);
789 _addOutput: function (line) { argument
796 line = line.replace(/^(?:\r\n|\r|\n)/, '');
799 if (!line) {
800 return line;
804 line = line.replace(/\\/g, '\\\\');
807 line = line.replace(/\n/g, '\\n');
808 line = line.replace(/\r/g, '\\r');
812 line = line.replace(/"/g, '\\"');
813 this.source += ' ; __append("' + line + '")' + '\n';
816 scanLine: function (line) { argument
818 var d = this.opts.delimiter;
823 newLineCount = (line.split('\n').length - 1);
825 switch (line) {
826 case o + d:
827 case o + d + '_':
830 case o + d + '=':
833 case o + d + '-':
836 case o + d + '#':
839 case o + d + d:
841 this.source += ' ; __append("' + line.replace(o + d + d, o + d) + '")' + '\n';
843 case d + d + c:
845 this.source += ' ; __append("' + line.replace(d + d + c, d + c) + '")' + '\n';
847 case d + c:
848 case '-' + d + c:
849 case '_' + d + c:
851 this._addOutput(line);
855 this.truncate = line.indexOf('-') === 0 || line.indexOf('_') === 0;
865 if (line.lastIndexOf('//') > line.lastIndexOf('\n')) {
866 line += '\n';
872 this.source += ' ; ' + line + '\n';
876 this.source += ' ; __append(escapeFn(' + stripSemi(line) + '))' + '\n';
880 this.source += ' ; __append(' + stripSemi(line) + ')' + '\n';
887 this._addOutput(line);
893 this._addOutput(line);