Socket
Socket
Sign inDemoInstall

edge-lexer

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edge-lexer - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

1

build/src/Tokenizer/index.d.ts

@@ -14,2 +14,3 @@ import { ITags, IToken } from '../Contracts';

private openedTags;
private _skipNewLine;
constructor(template: string, tagsDef: ITags, options: tokenizerOptions);

@@ -16,0 +17,0 @@ private _getRawNode;

11

build/src/Tokenizer/index.js

@@ -17,2 +17,3 @@ "use strict";

this.openedTags = [];
this._skipNewLine = false;
}

@@ -146,6 +147,2 @@ _getRawNode(text) {

if (this.openedTags.length) {
const latestTag = this.openedTags[this.openedTags.length - 1];
if (tag.type === 'newline' && !latestTag.children.length) {
return;
}
this.openedTags[this.openedTags.length - 1].children.push(tag);

@@ -177,8 +174,12 @@ return;

}
this._pushNewLine();
if (!this._skipNewLine) {
this._pushNewLine();
}
const tag = Detector_1.getTag(line, this.line, 0, this.tagsDef);
if (tag) {
this._handleTagOpening(line, tag);
this._skipNewLine = true;
return;
}
this._skipNewLine = false;
const mustache = Detector_1.getMustache(line, this.line, 0);

@@ -185,0 +186,0 @@ if (mustache) {

@@ -0,1 +1,11 @@

<a name="2.0.3"></a>
## [2.0.3](https://github.com/edge-js/edge-lexer/compare/v2.0.2...v2.0.3) (2018-11-09)
### Bug Fixes
* **Tokenizer:** do not add newline after tags ([19f5aff](https://github.com/edge-js/edge-lexer/commit/19f5aff))
<a name="2.0.2"></a>

@@ -2,0 +12,0 @@ ## [2.0.2](https://github.com/edge-js/edge-lexer/compare/v2.0.1...v2.0.2) (2018-11-09)

{
"name": "edge-lexer",
"version": "2.0.2",
"version": "2.0.3",
"description": "Parses raw markup files to converts them to Edge tokens",

@@ -5,0 +5,0 @@ "main": "build/src/Tokenizer/index.js",

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