@codemirror/lang-html
Advanced tools
Comparing version 6.4.0 to 6.4.1
@@ -0,1 +1,7 @@ | ||
## 6.4.1 (2023-01-12) | ||
### Bug fixes | ||
Use only the tag name for matching of opening and closing tags. | ||
## 6.4.0 (2022-11-30) | ||
@@ -2,0 +8,0 @@ |
@@ -47,3 +47,3 @@ import * as _codemirror_state from '@codemirror/state'; | ||
declare type NestedLang = { | ||
tag: "script" | "style" | "textarea"; | ||
tag: string; | ||
attrs?: (attrs: { | ||
@@ -94,6 +94,6 @@ [attr: string]: string; | ||
/** | ||
Register additional languages to parse the content of script, | ||
style, or textarea tags. If given, `attrs` should be a function | ||
that, given an object representing the tag's attributes, returns | ||
`true` if this language applies. | ||
Register additional languages to parse the content of specific | ||
tags. If given, `attrs` should be a function that, given an | ||
object representing the tag's attributes, returns `true` if this | ||
language applies. | ||
*/ | ||
@@ -100,0 +100,0 @@ nestedLanguages?: NestedLang[]; |
@@ -6,3 +6,3 @@ import { parser, configureNesting } from '@lezer/html'; | ||
import { EditorSelection } from '@codemirror/state'; | ||
import { syntaxTree, LRLanguage, indentNodeProp, foldNodeProp, LanguageSupport } from '@codemirror/language'; | ||
import { syntaxTree, LRLanguage, indentNodeProp, foldNodeProp, bracketMatchingHandle, LanguageSupport } from '@codemirror/language'; | ||
@@ -309,3 +309,2 @@ const Targets = ["_blank", "_self", "_top", "_parent"]; | ||
translate: ["yes", "no"], | ||
onclick: null, | ||
rel: ["stylesheet", "alternate", "author", "bookmark", "help", "license", "next", "nofollow", "noreferrer", "prefetch", "prev", "search", "tag"], | ||
@@ -348,2 +347,7 @@ role: /*@__PURE__*/"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "), | ||
}; | ||
const eventAttributes = /*@__PURE__*/("beforeunload copy cut dragstart dragover dragleave dragenter dragend " + | ||
"drag paste focus blur change click load mousedown mouseenter mouseleave " + | ||
"mouseup keydown keyup resize scroll unload").split(" ").map(n => "on" + n); | ||
for (let a of eventAttributes) | ||
GlobalAttrs[a] = null; | ||
class Schema { | ||
@@ -523,6 +527,3 @@ constructor(extraTags, extraAttrs) { | ||
parser: /*@__PURE__*/cssLanguage.parser.configure({ top: "Styles" }) } | ||
].concat(/*@__PURE__*/("beforeunload copy cut dragstart dragover dragleave dragenter dragend " + | ||
"drag paste focus blur change click load mousedown mouseenter mouseleave " + | ||
"mouseup keydown keyup resize scroll unload").split(" ") | ||
.map(event => ({ name: "on" + event, parser: javascriptLanguage.parser }))); | ||
].concat(/*@__PURE__*/eventAttributes.map(name => ({ name, parser: javascriptLanguage.parser }))); | ||
/** | ||
@@ -570,2 +571,5 @@ A language provider based on the [Lezer HTML | ||
} | ||
}), | ||
/*@__PURE__*/bracketMatchingHandle.add({ | ||
"OpenTag CloseTag": node => node.getChild("TagName") | ||
}) | ||
@@ -572,0 +576,0 @@ ], |
{ | ||
"name": "@codemirror/lang-html", | ||
"version": "6.4.0", | ||
"version": "6.4.1", | ||
"description": "HTML language support for the CodeMirror code editor", | ||
@@ -32,5 +32,5 @@ "scripts": { | ||
"@codemirror/lang-javascript": "^6.0.0", | ||
"@codemirror/language": "^6.0.0", | ||
"@codemirror/language": "^6.4.0", | ||
"@codemirror/state": "^6.0.0", | ||
"@lezer/html": "^1.1.0", | ||
"@lezer/html": "^1.3.0", | ||
"@lezer/common": "^1.0.0", | ||
@@ -37,0 +37,0 @@ "@lezer/css": "^1.1.0", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
70878
1387
Updated@codemirror/language@^6.4.0
Updated@lezer/html@^1.3.0