Skip to content

Commit 0ee7c96

Browse files
committed
0.7.0 release
1 parent ebaf9d5 commit 0ee7c96

5 files changed

Lines changed: 27 additions & 8 deletions

File tree

build.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.{
22
.name = .superhtml,
3-
.version = "0.6.2",
3+
.version = "0.7.0",
44
.fingerprint = 0xc5e9aede3c1db363,
55
.minimum_zig_version = "0.17.0-dev.702+18b3c78a9",
66
.dependencies = .{

editors/vscode/CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,27 @@
22

33
All notable changes to the SuperHTML extension will be documented in this file.
44

5+
## [v0.7.0]
6+
- Added support for `[role]` and `[aria-*]` attributes (thanks bitterlox!) which
7+
includes also autocomplete support for the language server.
8+
- Greatly improved JS formatting: JS code has now a proper tokenizer that
9+
avoids the previous issues with formatting code that makes non-trivial
10+
use of curly braces (thanks Jeffrey Crochet!).
11+
- Relaxed rules for `<iframe [allow]>`: apparently nobody on the internet
12+
respects the grammar for values of this attribute (eg. when you copy
13+
embed code from youtube, it gives you completely wrong code), and since
14+
that grammar is a spec external to the HTML spec, I've made checking more
15+
lenient because it would otherwise be too hard for users to figure out
16+
the right syntax.
17+
- Fix `<svg>`, `<math>`, `<ins>`, `<del>` categorization (previously you
18+
would get false positive nesting errors).
19+
- Fixed incorrect analysis of comments inside of `<details>` elements which
20+
could cause false positive errors for a `<summary>` child.
21+
- Fixed some minor bugs relative to the obsolete `<script>` double escape
22+
state. This should have no impact on anybody as it's a legacy feature.
23+
- Fixed a rendering bug where formatting a file multiple times in a row
24+
could cause it to end up with 2 newlines at the bottom (instead of 1).
25+
526
## [v0.6.2]
627
- The "boolean attributes cannot have a value" error now puts squigglies under the attribute name instead of the value.
728
- Improved validation for `<link>` `[crossorigin]`, it previously used its own implementation of CORS validation, while now it uses one central implementation shared by all other similar attributes.

editors/vscode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Language Server for HTML and SuperHTML Templates.",
55
"repository": "https://github.com/kristoff-it/superhtml/",
66
"publisher": "LorisCro",
7-
"version": "0.6.2",
7+
"version": "0.7.0",
88
"engines": {
99
"vscode": "^1.92.0"
1010
},

src/cli/lsp.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ pub fn @"textDocument/didOpen"(
169169
else => |tag| @tagName(tag),
170170
.custom_value => |cv| cv,
171171
}) orelse {
172-
log.err("unrecognized language id: '{s}'", .{language_id});
172+
log.err("unrecognized language id: '{t}'", .{language_id});
173173
try self.windowNotification(
174174
.Error,
175175
"Unrecognized languageId, expected are: html, superhtml, xml",

src/wasm.zig

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ const std = @import("std");
22
const builtin = @import("builtin");
33
const lsp_exe = @import("cli/lsp.zig");
44

5-
pub fn main() !void {
6-
const gpa = std.heap.wasm_allocator;
7-
const args = std.process.argsAlloc(gpa) catch std.process.fatal("oom", .{});
8-
defer std.process.argsFree(gpa, args);
9-
try lsp_exe.run(gpa, args[1..]);
5+
pub fn main(init: std.process.Init) !void {
6+
const args = try init.minimal.args.toSlice(init.arena.allocator());
7+
try lsp_exe.run(init.io, init.gpa, args[1..]);
108
}

0 commit comments

Comments
 (0)