Fix a bug in autoCloseTags
that made tags not close when typing > after an attribute.
Complete attribute names after whitespace in a tag even when completion isn't explicitly triggered.
Parse script
tags with application/json
type as JSON syntax.
autoCloseTags
now generates two separate transactions, so that the completion can be undone separately.
Add highlighting for the content of <script>
tags with a type of importmap
or speculationrules
.
Fix a bug where HTML autocompletion didn't work when the cursor was at the end of a bit of HTML code inside a mixed-language document.
Fix a bug where the completed tag names didn't take into account the parent node's declared children in the schema in some circumstances.
Fix a bug that could cause some nested language regions to be parsed multiple times.
Fix an issue where autoCloseTags
would close self-closing tags when typed directly in front of a word.
Use only the tag name for matching of opening and closing tags.
Directly depend on @lang/css 1.1.0, since we're using a new top rule name introduced in that.
Add a globalAttrs
property to (completion) TagSpec
objects that controls whether global attributes are completed in that tag.
Remove incorrect pure annotation that broke the code after tree-shaking.
Parse type=text/babel script tags as JSX.
The new nestedLanguages
option can be used to configure how the content of script, style, and textarea tags is parsed.
The content of style attributes will now be parsed as CSS, and the content of on[event] attributes as JavaScript. The new nestedAttributes
option can be used to configure the parsing of other attribute values.
Add a selfClosingTags
option to html
that enables />
syntax.
Parse the content of text/javascript or lang=ts script tags as TypeScript, use JS for text/jsx, and TSX for text/typescript-jsx.
Remove deprecated HTML tags from the completions.
Make tag auto-closing consume >
characters after the cursor.
Properly list the dependency on @codemirror/view in package.json.
It is now possible to pass in options to extend the set of tags and attributes provided by autocompletion.
Update dependencies to 6.0.0
Autocompletion now suggests the <template>
and <slot>
elements.
Fix an issue where autoclosing a tag directly in front of alphanumeric text would include nonsense text in the completed tag name.
The package now exports a completion source function, rather than a prebuilt completion extension.
Use more specific highlighting tags for attribute names and values.
The new autoCloseTags
extension (included by default in html()
) finishes closing tags when you type a >
or /
character.
Fix incorrect versions for @lezer dependencies.
Improve autocompletion in/after unclosed opening tags.
html()
now takes a matchClosingTags
option to turn off closing tag matching.
Fix an issue where the completer would sometimes try to complete an opening tag to its own close tag.
Fix a bug that would sometimes produce the wrong indentation in HTML elements.
Fix a bug that broke tag-specific attribute completion in tags like <input>
or <script>
.
Move a new version of lezer-html which solves some issues with autocompletion.
Improves indentation at end of implicitly closed elements.
The package now also exports a CommonJS module.
First numbered release.