@itrocks/template 0.0.14 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
- [![view on npm](https://badgen.net/npm/v/@itrocks/template)](https://www.npmjs.org/package/@itrocks/template)
2
- [![npm module downloads](https://badgen.net/npm/dt/@itrocks/template)](https://www.npmjs.org/package/@itrocks/template)
3
- [![GitHub repo dependents](https://badgen.net/github/dependents-repo/itrocks-ts/template?label=dependents)](https://github.com/itrocks-ts/template/network/dependents?dependent_type=REPOSITORY)
4
- [![Report issues on GitHub](https://badgen.net/github/open-issues/itrocks-ts/template?icon=github)](https://github.com/itrocks-ts/template/issues)
5
- [![Get support on Discord](https://badgen.net/discord/members/kbMjUq5F?icon=discord)](https://discord.gg/kbMjUq5F)
1
+ [![npm version](https://img.shields.io/npm/v/@itrocks/template?logo=npm)](https://www.npmjs.org/package/@itrocks/template)
2
+ [![npm downloads](https://img.shields.io/npm/dm/@itrocks/template)](https://www.npmjs.org/package/@itrocks/template)
3
+ [![GitHub](https://img.shields.io/github/last-commit/itrocks-ts/template?color=2dba4e&label=commit&logo=github)](https://github.com/itrocks-ts/template)
4
+ [![issues](https://img.shields.io/github/issues/itrocks-ts/template)](https://github.com/itrocks-ts/template/issues)
5
+ [![discord](https://img.shields.io/discord/1314141024020467782?color=7289da&label=discord&logo=discord&logoColor=white)](https://discord.gg/RZYhmhgrCk)
6
6
 
7
7
  # template
8
8
 
package/cjs/template.js CHANGED
@@ -393,8 +393,8 @@ class Template {
393
393
  // comment tag
394
394
  if ((char === '-') && (source[index] === '-')) {
395
395
  index++;
396
- if (!/[a-z0-9@%{]/i.test(source[index])
397
- || !this.doExpression
396
+ if (!this.doExpression
397
+ || !this.startsExpression(source[index])
398
398
  || ((source[index] === 'B') && this.included && (source.substring(index, index + 8) === 'BEGIN-->'))
399
399
  || ((source[index] === 'E') && this.included && (source.substring(index, index + 6) === 'END-->'))) {
400
400
  index = source.indexOf('-->', index) + 3;
package/esm/template.js CHANGED
@@ -388,8 +388,8 @@ export default class Template {
388
388
  // comment tag
389
389
  if ((char === '-') && (source[index] === '-')) {
390
390
  index++;
391
- if (!/[a-z0-9@%{]/i.test(source[index])
392
- || !this.doExpression
391
+ if (!this.doExpression
392
+ || !this.startsExpression(source[index])
393
393
  || ((source[index] === 'B') && this.included && (source.substring(index, index + 8) === 'BEGIN-->'))
394
394
  || ((source[index] === 'E') && this.included && (source.substring(index, index + 6) === 'END-->'))) {
395
395
  index = source.indexOf('-->', index) + 3;
package/package.json CHANGED
@@ -60,5 +60,5 @@
60
60
  "test": "jest"
61
61
  },
62
62
  "types": "./esm/template.d.ts",
63
- "version": "0.0.14"
63
+ "version": "0.0.16"
64
64
  }