Skip to content

Commit

Permalink
improve release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
kristoff-it committed Jul 25, 2024
1 parent 5777218 commit 0476248
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions content/log.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ Now onto new features and breaking changes:

- [SuperHTML](https://github.com/kristoff-it/superhtml) (Zine's templating language) dropped Tree Sitter as its HTML parser in favor of a handcrafted implementation that more closely follows the HTML5 spec. This brings us **significantly** improved error messages and other advantages.

- [It's **highly** recommended you install and configure SuperHTML](https://github.com/kristoff-it/superhtml) as your language server for both HTML and SuperHTML Templates (.shtml) **in order to get in-editor diagnostics and kickass autoformatting**. The repo also offers a Tree Sitter grammar for SuperHTML that incudes a few visual improvements for tags and attributes that have semantic meaning.
- [It's **highly** recommended you install and configure SuperHTML](https://github.com/kristoff-it/superhtml) as your language server for both HTML and SuperHTML Templates **in order to get in-editor diagnostics and kickass autoformatting**. The repo also offers a Tree Sitter grammar for SuperHTML that incudes a few visual improvements for tags and attributes that have semantic meaning.

SuperHTML also has a [VSCode extension](https://marketplace.visualstudio.com/items?itemName=LorisCro.super).

- SuperHTML follows the HTML5 spec much more closely and, while writing an HTML parser from scratch for it, I learned that self-closing tags (tags with a final `/`) are not a thing in HTML5, so now `<extend>` and `<super>` want no final slash.
- SuperHTML follows the HTML5 spec much more closely and, while writing an HTML parser from scratch for it, I learned that self-closing tags (tags with a final `/`) are not a thing in HTML5, so now `<extend>` and `<super>` have been defined as [void elements](https://developer.mozilla.org/en-US/docs/Glossary/Void_element) in SuperHTML and want no final slash nor closing tag.

Note that SuperHTML will consider an error using self-closing tags in HTML (outside of a `<svg>` scope).

- The correct file extension for templates is `.shtml`. **You must rename all your templates to the new file extension** otherwise you will get an error from SuperHTML when it sees non-HTML compliant syntax, since `<extend>` and `<super>` are recognized as void elements only in SuperHTML template files.

- Scripty has impoved as well: inside of nested loops, it is now possible to access outer `$loop` variables by doing `$loop.up()`. Each call to `up()` goes up one level.

- This is thanks to the fact that interrupts were implemented in Scripty, opening the door to features that rely on the ability to pass from the outside values into scripty (`up()` relies on that since loops are a SuperHTML concept that Scripty is completely unaware of).
Expand Down

0 comments on commit 0476248

Please sign in to comment.