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

@codemirror/lang-html

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/lang-html - npm Package Compare versions

Comparing version 6.4.8 to 6.4.9

6

CHANGELOG.md

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

## 6.4.9 (2024-04-12)
### Bug fixes
Fix a bug in `autoCloseTags` that made tags not close when typing > after an attribute.
## 6.4.8 (2024-01-23)

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

19

dist/index.js

@@ -630,8 +630,7 @@ import { parser, configureNesting } from '@lezer/html';

let didType = state.doc.sliceString(range.from - 1, range.to) == text;
let { head } = range, around = syntaxTree(state).resolveInner(head - 1, -1), name;
if (around.name == "TagName" || around.name == "StartTag")
around = around.parent;
if (didType && text == ">" && around.name == "OpenTag") {
if (((_b = (_a = around.parent) === null || _a === void 0 ? void 0 : _a.lastChild) === null || _b === void 0 ? void 0 : _b.name) != "CloseTag" &&
(name = elementName(state.doc, around.parent, head)) &&
let { head } = range, after = syntaxTree(state).resolveInner(head, -1), name;
if (didType && text == ">" && after.name == "EndTag") {
let tag = after.parent;
if (((_b = (_a = tag.parent) === null || _a === void 0 ? void 0 : _a.lastChild) === null || _b === void 0 ? void 0 : _b.name) != "CloseTag" &&
(name = elementName(state.doc, tag.parent, head)) &&
!selfClosers.has(name)) {

@@ -643,6 +642,6 @@ let to = head + (state.doc.sliceString(head, head + 1) === ">" ? 1 : 0);

}
else if (didType && text == "/" && around.name == "IncompleteCloseTag") {
let base = around.parent;
if (around.from == head - 2 && ((_c = base.lastChild) === null || _c === void 0 ? void 0 : _c.name) != "CloseTag" &&
(name = elementName(state.doc, base, head)) && !selfClosers.has(name)) {
else if (didType && text == "/" && after.name == "IncompleteCloseTag") {
let tag = after.parent;
if (after.from == head - 2 && ((_c = tag.lastChild) === null || _c === void 0 ? void 0 : _c.name) != "CloseTag" &&
(name = elementName(state.doc, tag, head)) && !selfClosers.has(name)) {
let to = head + (state.doc.sliceString(head, head + 1) === ">" ? 1 : 0);

@@ -649,0 +648,0 @@ let insert = `${name}>`;

{
"name": "@codemirror/lang-html",
"version": "6.4.8",
"version": "6.4.9",
"description": "HTML language support for the CodeMirror code editor",

@@ -5,0 +5,0 @@ "scripts": {

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