Comparing version 5.1.0 to 5.1.1
@@ -0,1 +1,5 @@ | ||
# 5.1.1 | ||
* Fixed: bug with empty EJS eval tags (`<% %>`) | ||
* Fixed: bug with text after EJS tag inside custom tag (`<my-tag><%= a %> text</my-tag>`) | ||
# 5.1.0 | ||
@@ -2,0 +6,0 @@ * Added: `sourceMap` option to create source maps |
@@ -228,3 +228,3 @@ 'use strict' | ||
// Prepare footer | ||
if (state === 'rest' && !asInnerExpression) { | ||
if (state === 'rest' && (!asInnerExpression || hasStatements)) { | ||
builder.add(';') | ||
@@ -231,0 +231,0 @@ } |
@@ -175,6 +175,2 @@ 'use strict' | ||
function readSimpleToken(type, endRegex, trimRight) { | ||
let match = exec(endRegex) | ||
if (!match) { | ||
throwSyntaxError(`Unterminated ${type}`) | ||
} | ||
if (trimRight) { | ||
@@ -186,2 +182,6 @@ let matchTrim = exec(/\S/g) | ||
} | ||
let match = exec(endRegex) | ||
if (!match) { | ||
throwSyntaxError(`Unterminated ${type}`) | ||
} | ||
let start = getSourcePoint() | ||
@@ -188,0 +188,0 @@ advanceTo(match.index) |
{ | ||
"name": "ejs-html", | ||
"version": "5.1.0", | ||
"version": "5.1.1", | ||
"author": "Sitegui <sitegui@sitegui.com.br>", | ||
@@ -5,0 +5,0 @@ "description": "Embedded JavaScript HTML templates. An implementation of EJS focused on run-time performance, HTML syntax checking, minified HTML output and custom HTML elements.", |
@@ -144,3 +144,3 @@ # EJS HTML | ||
## Source maps | ||
Compile with support for source map generation | ||
Compile with support for source map generation (requires node >= v8, since `source-map` has dropped support for older versions) | ||
```js | ||
@@ -147,0 +147,0 @@ let fn = ejs.compile('Hello <%= locals.world %>', {sourceMap: true}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67402