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.1 to 6.4.2

6

CHANGELOG.md

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

## 6.4.2 (2023-02-10)
### Bug fixes
Fix an issue where `autoCloseTags` would close self-closing tags when typed directly in front of a word.
## 6.4.1 (2023-01-12)

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

9

dist/index.js

@@ -602,2 +602,3 @@ import { parser, configureNesting } from '@lezer/html';

}
const selfClosers = /*@__PURE__*/new Set(/*@__PURE__*/"area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" "));
/**

@@ -618,3 +619,5 @@ Extension that will automatically insert close tags when a `>` or

if (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))) {
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)) &&
!selfClosers.has(name)) {
let hasRightBracket = view.state.doc.sliceString(head, head + 1) === ">";

@@ -627,3 +630,5 @@ let insert = `${hasRightBracket ? "" : ">"}</${name}>`;

let empty = around.parent, base = empty === null || empty === void 0 ? void 0 : empty.parent;
if (empty.from == head - 1 && ((_c = base.lastChild) === null || _c === void 0 ? void 0 : _c.name) != "CloseTag" && (name = elementName(state.doc, base, head))) {
if (empty.from == head - 1 && ((_c = base.lastChild) === null || _c === void 0 ? void 0 : _c.name) != "CloseTag" &&
(name = elementName(state.doc, base, head)) &&
!selfClosers.has(name)) {
let hasRightBracket = view.state.doc.sliceString(head, head + 1) === ">";

@@ -630,0 +635,0 @@ let insert = `/${name}${hasRightBracket ? "" : ">"}`;

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

@@ -15,3 +15,3 @@ "scripts": {

"name": "Marijn Haverbeke",
"email": "marijnh@gmail.com",
"email": "marijn@haverbeke.berlin",
"url": "http://marijnhaverbeke.nl"

@@ -18,0 +18,0 @@ },

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