Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

easy-template-x

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easy-template-x - npm Package Compare versions

Comparing version 0.10.1 to 0.10.2

dist/types/utils/regex.d.ts

6

CHANGELOG.md
# Change Log
## [0.10.2 - 2020-02-16](https://github.com/alonrbar/easy-template-x/tree/v0.10.2)
### Fixed
- Parsing of tags with custom delimiters.
## [0.10.1 - 2020-02-12](https://github.com/alonrbar/easy-template-x/tree/v0.10.1)

@@ -4,0 +10,0 @@

1

dist/types/utils/index.d.ts

@@ -5,3 +5,4 @@ export * from './array';

export * from './path';
export * from './regex';
export * from './sha1';
export * from './types';

2

package.json
{
"name": "easy-template-x",
"version": "0.10.1",
"version": "0.10.2",
"description": "Generate docx documents from templates, in Node or in the browser.",

@@ -5,0 +5,0 @@ "keywords": [

import { Delimiters } from '../delimiters';
import { MissingArgumentError, MissingCloseDelimiterError, MissingStartDelimiterError } from '../errors';
import { DocxParser } from '../office';
import { Regex } from '../utils';
import { DelimiterMark } from './delimiterMark';

@@ -20,4 +21,3 @@ import { Tag, TagDisposition } from './tag';

// TODO: regex escape
this.tagRegex = new RegExp(`^[${delimiters.tagStart}](.*?)[${delimiters.tagEnd}]`, 'mi');
this.tagRegex = new RegExp(`^${Regex.escape(delimiters.tagStart)}(.*?)${Regex.escape(delimiters.tagEnd)}`, 'm');
}

@@ -72,6 +72,6 @@

* Consolidate all tag's text into a single text node.
*
* Example:
*
* Text node before: "some text {some tag} some more text"
*
* Example:
*
* Text node before: "some text {some tag} some more text"
* Text nodes after: [ "some text ", "{some tag}", " some more text" ]

@@ -100,3 +100,3 @@ */

if (closeDelimiter.index < endTextNode.textContent.length - 1) {
endTextNode = this.docParser.splitTextNode(endTextNode, closeDelimiter.index + 1, true);
endTextNode = this.docParser.splitTextNode(endTextNode, closeDelimiter.index + this.delimiters.tagEnd.length, true);
if (sameNode) {

@@ -161,2 +161,2 @@ startTextNode = endTextNode;

}
}
}

@@ -5,3 +5,4 @@ export * from './array';

export * from './path';
export * from './regex';
export * from './sha1';
export * from './types';

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc