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.6 to 1.3.7

src/.tern-port

8

CHANGELOG.md

@@ -0,1 +1,9 @@

## 1.3.7 (2023-11-23)
### Bug fixes
Fix a bug that caused the parser to not properly recognize empty HTML comments. Don't emit nested parses for empty elements in configureNesting
Fix an issue where `configureNesting` could emit empty overlay ranges for empty elements.
## 1.3.6 (2023-07-12)

@@ -2,0 +10,0 @@

6

dist/index.js

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

} else if (input.next == greaterThan && dashes >= 2) {
if (i > 3) input.acceptToken(commentContent$1, -2);
if (i >= 3) input.acceptToken(commentContent$1, -2);
break

@@ -331,3 +331,5 @@ } else {

let close = n.lastChild;
return {parser: tag.parser, overlay: [{from: open.to, to: close.type.id == CloseTag ? close.from : n.to}]}
let to = close.type.id == CloseTag ? close.from : n.to;
if (to > open.to)
return {parser: tag.parser, overlay: [{from: open.to, to}]}
}

@@ -334,0 +336,0 @@ }

{
"name": "@lezer/html",
"version": "1.3.6",
"version": "1.3.7",
"description": "lezer-based HTML grammar",

@@ -18,3 +18,3 @@ "main": "dist/index.cjs",

"@lezer/generator": "^1.0.0",
"mocha": "^9.0.1",
"mocha": "^10.2.0",
"rollup": "^2.52.2",

@@ -21,0 +21,0 @@ "@rollup/plugin-node-resolve": "^9.0.0"

@@ -61,3 +61,5 @@ import {ScriptText, StyleText, TextareaText,

let close = n.lastChild
return {parser: tag.parser, overlay: [{from: open.to, to: close.type.id == CloseTag ? close.from : n.to}]}
let to = close.type.id == CloseTag ? close.from : n.to
if (to > open.to)
return {parser: tag.parser, overlay: [{from: open.to, to}]}
}

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

@@ -140,3 +140,3 @@ /* Hand-written tokenizers for HTML. */

} else if (input.next == greaterThan && dashes >= 2) {
if (i > 3) input.acceptToken(cmntContent, -2)
if (i >= 3) input.acceptToken(cmntContent, -2)
break

@@ -143,0 +143,0 @@ } else {

@@ -120,6 +120,9 @@ # Regular tag

<element><!-- inner comment --> text</element>
<!---->
<!--
-->
==>
Document(Comment,Text,Element(OpenTag(StartTag,TagName,EndTag),Comment,Text,CloseTag(StartCloseTag,TagName,EndTag)))
Document(Comment,Text,Element(OpenTag(StartTag,TagName,EndTag),Comment,Text,CloseTag(StartCloseTag,TagName,EndTag)),Text,Comment,Text,Comment)

@@ -126,0 +129,0 @@ # Mismatched tag

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