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

@lezer/html

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lezer/html - npm Package Compare versions

Comparing version 1.3.3 to 1.3.4

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 1.3.4 (2023-03-27)
### Bug fixes
Fix a bug that caused mixed parsing of non-style/script elements to attach the nested parse tree to the incorrect node.
## 1.3.3 (2023-02-21)

@@ -2,0 +8,0 @@

10

dist/index.es.js

@@ -325,8 +325,8 @@ import { ContextTracker, ExternalTokenizer, LRParser } from '@lezer/lr';

if (id == OpenTag && other.length) {
let n = node.node, tagName = findTagName(n, input), attrs;
for (let tag of other) {
if (id == Element && other.length) {
let n = node.node, open = n.firstChild, tagName = open && findTagName(open, input), attrs;
if (tagName) for (let tag of other) {
if (tag.tag == tagName && (!tag.attrs || tag.attrs(attrs || (attrs = getAttrs(n, input))))) {
let close = n.parent.lastChild;
return {parser: tag.parser, overlay: [{from: node.to, to: close.type.id == CloseTag ? close.from : n.parent.to}]}
let close = n.lastChild;
return {parser: tag.parser, overlay: [{from: open.to, to: close.type.id == CloseTag ? close.from : n.to}]}
}

@@ -333,0 +333,0 @@ }

{
"name": "@lezer/html",
"version": "1.3.3",
"version": "1.3.4",
"description": "lezer-based HTML grammar",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs",

@@ -56,8 +56,8 @@ import {ScriptText, StyleText, TextareaText,

if (id == OpenTag && other.length) {
let n = node.node, tagName = findTagName(n, input), attrs
for (let tag of other) {
if (id == Element && other.length) {
let n = node.node, open = n.firstChild, tagName = open && findTagName(open, input), attrs
if (tagName) for (let tag of other) {
if (tag.tag == tagName && (!tag.attrs || tag.attrs(attrs || (attrs = getAttrs(n, input))))) {
let close = n.parent.lastChild
return {parser: tag.parser, overlay: [{from: node.to, to: close.type.id == CloseTag ? close.from : n.parent.to}]}
let close = n.lastChild
return {parser: tag.parser, overlay: [{from: open.to, to: close.type.id == CloseTag ? close.from : n.to}]}
}

@@ -64,0 +64,0 @@ }

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