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

simple-html-tokenizer

Package Overview
Dependencies
Maintainers
6
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-html-tokenizer - npm Package Compare versions

Comparing version 0.5.9 to 0.5.10

CHANGELOG.md

8

dist/es6/index.js

@@ -50,5 +50,7 @@ /**

var EventedTokenizer = /** @class */ (function () {
function EventedTokenizer(delegate, entityParser) {
function EventedTokenizer(delegate, entityParser, mode) {
if (mode === void 0) { mode = 'precompile'; }
this.delegate = delegate;
this.entityParser = entityParser;
this.mode = mode;
this.state = "beforeData" /* beforeData */;

@@ -69,3 +71,3 @@ this.line = -1;

else {
if (char === '\n') {
if (this.mode === 'precompile' && char === '\n') {
var tag = this.tagNameBuffer.toLowerCase();

@@ -527,3 +529,3 @@ if (tag === 'pre' || tag === 'textarea') {

this.tokens = [];
this.tokenizer = new EventedTokenizer(this, entityParser);
this.tokenizer = new EventedTokenizer(this, entityParser, options.mode);
this._currentAttribute = undefined;

@@ -530,0 +532,0 @@ }

@@ -56,5 +56,7 @@ (function (global, factory) {

var EventedTokenizer = /** @class */ (function () {
function EventedTokenizer(delegate, entityParser) {
function EventedTokenizer(delegate, entityParser, mode) {
if (mode === void 0) { mode = 'precompile'; }
this.delegate = delegate;
this.entityParser = entityParser;
this.mode = mode;
this.state = "beforeData" /* beforeData */;

@@ -75,3 +77,3 @@ this.line = -1;

else {
if (char === '\n') {
if (this.mode === 'precompile' && char === '\n') {
var tag = this.tagNameBuffer.toLowerCase();

@@ -533,3 +535,3 @@ if (tag === 'pre' || tag === 'textarea') {

this.tokens = [];
this.tokenizer = new EventedTokenizer(this, entityParser);
this.tokenizer = new EventedTokenizer(this, entityParser, options.mode);
this._currentAttribute = undefined;

@@ -536,0 +538,0 @@ }

@@ -5,2 +5,3 @@ import { EntityParser, TokenizerDelegate, TokenizerState } from './types';

private entityParser;
private mode;
state: TokenizerState;

@@ -12,3 +13,3 @@ line: number;

private tagNameBuffer;
constructor(delegate: TokenizerDelegate, entityParser: EntityParser);
constructor(delegate: TokenizerDelegate, entityParser: EntityParser, mode?: 'codemod' | 'precompile');
reset(): void;

@@ -15,0 +16,0 @@ transitionTo(state: TokenizerState): void;

@@ -9,2 +9,3 @@ export interface NamedEntityMap {

loc?: boolean;
mode?: 'precompile' | 'codemod';
}

@@ -11,0 +12,0 @@ export declare type Attribute = [string, string, boolean];

{
"name": "simple-html-tokenizer",
"version": "0.5.9",
"license": "MIT",
"version": "0.5.10",
"description": "Simple HTML Tokenizer is a lightweight JavaScript library that can be used to tokenize the kind of HTML normally found in templates.",

@@ -14,2 +13,3 @@ "keywords": [

},
"license": "MIT",
"main": "dist/simple-html-tokenizer.js",

@@ -24,6 +24,6 @@ "module": "dist/es6/index.js",

"build": "ember build",
"lint": "tslint -p tsconfig.json",
"prepare": "ember build",
"prepublish": "rm -rf node_modules/in-repo-commands && ln -s ../commands node_modules/in-repo-commands && rm -rf node_modules/symlink-self && ln -s ../lib/symlink-self node_modules/symlink-self",
"prepare": "ember build",
"test": "ember test && nyc qunit dist/tests/tests.js",
"lint": "tslint -p tsconfig.json"
"test": "ember test && nyc qunit dist/tests/tests.js"
},

@@ -43,2 +43,4 @@ "devDependencies": {

"qunit": "^2.5.1",
"release-it": "^14.0.2",
"release-it-lerna-changelog": "^2.4.0",
"rollup-plugin-sourcemaps": "^0.4.2",

@@ -48,3 +50,21 @@ "symlink-self": "file:./lib/symlink-self",

"typescript": "^2.7.2"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"release-it": {
"plugins": {
"release-it-lerna-changelog": {
"infile": "CHANGELOG.md",
"launchEditor": true
}
},
"git": {
"tagName": "v${version}"
},
"github": {
"release": true,
"tokenRef": "GITHUB_AUTH"
}
}
}

@@ -1,2 +0,2 @@

# Simple HTML Tokenizer [![Build Status](https://travis-ci.org/tildeio/simple-html-tokenizer.svg?branch=master)](https://travis-ci.org/tildeio/simple-html-tokenizer)
# Simple HTML Tokenizer [![Build Status](![CI](https://github.com/tildeio/simple-html-tokenizer/workflows/CI/badge.svg))](https://github.com/tildeio/simple-html-tokenizer/actions?query=workflow%3ACI)

@@ -3,0 +3,0 @@ Simple HTML Tokenizer is a lightweight JavaScript library that can be

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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