New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.2 to 6.4.3

6

CHANGELOG.md

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

## 6.4.3 (2023-03-27)
### Bug fixes
Fix a bug that could cause some nested language regions to be parsed multiple times.
## 6.4.2 (2023-02-10)

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

9

dist/index.d.ts

@@ -64,2 +64,9 @@ import * as _codemirror_state from '@codemirror/state';

*/
declare const htmlPlain: LRLanguage;
/**
A language provider based on the [Lezer HTML
parser](https://github.com/lezer-parser/html), extended with the
JavaScript and CSS parsers to parse the content of `<script>` and
`<style>` tags.
*/
declare const htmlLanguage: LRLanguage;

@@ -111,2 +118,2 @@ /**

export { TagSpec, autoCloseTags, html, htmlCompletionSource, htmlCompletionSourceWith, htmlLanguage };
export { TagSpec, autoCloseTags, html, htmlCompletionSource, htmlCompletionSourceWith, htmlLanguage, htmlPlain };

18

dist/index.js

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

*/
const htmlLanguage = /*@__PURE__*/LRLanguage.define({
const htmlPlain = /*@__PURE__*/LRLanguage.define({
name: "html",

@@ -572,4 +572,3 @@ parser: /*@__PURE__*/parser.configure({

})
],
wrap: /*@__PURE__*/configureNesting(defaultNesting, defaultAttrs)
]
}),

@@ -583,2 +582,11 @@ languageData: {

/**
A language provider based on the [Lezer HTML
parser](https://github.com/lezer-parser/html), extended with the
JavaScript and CSS parsers to parse the content of `<script>` and
`<style>` tags.
*/
const htmlLanguage = /*@__PURE__*/htmlPlain.configure({
wrap: /*@__PURE__*/configureNesting(defaultNesting, defaultAttrs)
});
/**
Language support for HTML, including

@@ -597,3 +605,3 @@ [`htmlCompletion`](https://codemirror.net/6/docs/ref/#lang-html.htmlCompletion) and JavaScript and

wrap = configureNesting((config.nestedLanguages || []).concat(defaultNesting), (config.nestedAttributes || []).concat(defaultAttrs));
let lang = wrap || dialect ? htmlLanguage.configure({ dialect, wrap }) : htmlLanguage;
let lang = wrap ? htmlPlain.configure({ wrap, dialect }) : dialect ? htmlLanguage.configure({ dialect }) : htmlLanguage;
return new LanguageSupport(lang, [

@@ -649,2 +657,2 @@ htmlLanguage.data.of({ autocomplete: htmlCompletionSourceWith(config) }),

export { autoCloseTags, html, htmlCompletionSource, htmlCompletionSourceWith, htmlLanguage };
export { autoCloseTags, html, htmlCompletionSource, htmlCompletionSourceWith, htmlLanguage, htmlPlain };
{
"name": "@codemirror/lang-html",
"version": "6.4.2",
"version": "6.4.3",
"description": "HTML language support for the CodeMirror code editor",

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

@@ -5,10 +5,10 @@ <!-- NOTE: README.md is generated from src/README.md -->

[ [**WEBSITE**](https://codemirror.net/6/) | [**ISSUES**](https://github.com/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://github.com/codemirror/lang-html/blob/main/CHANGELOG.md) ]
[ [**WEBSITE**](https://codemirror.net/) | [**ISSUES**](https://github.com/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://github.com/codemirror/lang-html/blob/main/CHANGELOG.md) ]
This package implements HTML language support for the
[CodeMirror](https://codemirror.net/6/) code editor.
[CodeMirror](https://codemirror.net/) code editor.
The [project page](https://codemirror.net/6/) has more information, a
number of [examples](https://codemirror.net/6/examples/) and the
[documentation](https://codemirror.net/6/docs/).
The [project page](https://codemirror.net/) has more information, a
number of [examples](https://codemirror.net/examples/) and the
[documentation](https://codemirror.net/docs/).

@@ -56,8 +56,8 @@ This code is released under an

</dd><dt id="user-content-html^config.nestedlanguages">
<code><strong><a href="#user-content-html^config.nestedlanguages">nestedLanguages</a></strong>&#8288;?: {tag: &quot;script&quot; | &quot;style&quot; | &quot;textarea&quot;, attrs&#8288;?: fn(<a id="user-content-html^config.nestedlanguages.attrs^attrs" href="#user-content-html^config.nestedlanguages.attrs^attrs">attrs</a>: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;) → <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>, parser: <a href="https://lezer.codemirror.net/docs/ref/#common.Parser">Parser</a>}[]</code></dt>
<code><strong><a href="#user-content-html^config.nestedlanguages">nestedLanguages</a></strong>&#8288;?: {tag: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, attrs&#8288;?: fn(<a id="user-content-html^config.nestedlanguages.attrs^attrs" href="#user-content-html^config.nestedlanguages.attrs^attrs">attrs</a>: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;) → <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>, parser: <a href="https://lezer.codemirror.net/docs/ref/#common.Parser">Parser</a>}[]</code></dt>
<dd><p>Register additional languages to parse the content of script,
style, or textarea tags. If given, <code>attrs</code> should be a function
that, given an object representing the tag's attributes, returns
<code>true</code> if this language applies.</p>
<dd><p>Register additional languages to parse the content of specific
tags. If given, <code>attrs</code> should be a function that, given an
object representing the tag's attributes, returns <code>true</code> if this
language applies.</p>
</dd><dt id="user-content-html^config.nestedattributes">

@@ -95,2 +95,6 @@ <code><strong><a href="#user-content-html^config.nestedattributes">nestedAttributes</a></strong>&#8288;?: {name: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, tagName&#8288;?: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, parser: <a href="https://lezer.codemirror.net/docs/ref/#common.Parser">Parser</a>}[]</code></dt>

attributes, or a list of strings for suggested attribute values.</p>
</dd><dt id="user-content-tagspec.globalattrs">
<code><strong><a href="#user-content-tagspec.globalattrs">globalAttrs</a></strong>&#8288;?: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></dt>
<dd><p>When set to false, don't complete global attributes on this tag.</p>
</dd><dt id="user-content-tagspec.children">

@@ -97,0 +101,0 @@ <code><strong><a href="#user-content-tagspec.children">children</a></strong>&#8288;?: readonly <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>[]</code></dt>

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