Comparing version 1.3.4 to 1.3.5
@@ -190,4 +190,12 @@ const htmlEncode = require('../libs/js-htmlencode'); | ||
let encodedLine = htmlEncode(line); | ||
let trim = line.trim(); | ||
if (mainInfo.title && !pointer){ | ||
var trim = line.substring(dLen); | ||
var pointer = trim; | ||
} | ||
else{ | ||
trim = line.trim(); | ||
} | ||
var dLen = line.length - trim.length; | ||
let encodedLine = htmlEncode(trim); | ||
let style = ''; | ||
@@ -228,8 +236,13 @@ | ||
if (isLastData && !hasErrorCoordinates && mainInfo.errorLine && mainInfo.errorLine.length > 2) { | ||
if (isLastData && !hasErrorCoordinates && mainInfo.errorLine) { | ||
let occur = data.jshtml.numberOfOccurrences(mainInfo.errorLine); | ||
if (occur.num === 1) { | ||
let extend = 0; | ||
if (occur.pos > 0 && data.jshtml[occur.pos - 1] === '@') | ||
extend = 1; // Include the '@' symbol for beauty. | ||
data.posRange = { | ||
start: occur.pos, | ||
start: occur.pos - extend, | ||
end: occur.pos + mainInfo.errorLine.length | ||
@@ -236,0 +249,0 @@ }; |
@@ -901,4 +901,2 @@ 'use strict'; | ||
else if (ch === '{') { | ||
//this.flushPadding(blocks); | ||
this.padding = padding + this.padding; | ||
block.type = blockType.code; | ||
@@ -905,0 +903,0 @@ return this.parseJsBlock(blocks, block, operatorName); |
@@ -75,3 +75,4 @@ //////////////////////////////////////////////// | ||
do { | ||
idx = this.indexOf(str, pos); | ||
let start = pos && pos + str.length; | ||
idx = this.indexOf(str, start); | ||
@@ -78,0 +79,0 @@ if (idx !== -1){ |
{ | ||
"name": "raz", | ||
"description": "Razor like HTML template engine for NodeJS Express library based on ASP.NET MVC Razor syntax. Template your views by mixing HTML markup with JavaScript server-side code!", | ||
"version": "1.3.4", | ||
"version": "1.3.5", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Sergey F.", |
@@ -1,2 +0,2 @@ | ||
# Razor-Express (RAZ): a view template engine for NodeJS/ExpressJS web servers | ||
# Razor-Express (RAZ): a view template engine for NodeJS/ExpressJS | ||
@@ -3,0 +3,0 @@ <p align="center"> |
131426
2477