Skip to content

Commit

Permalink
Add defer and inert to the list of boolean attributes (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospereira committed May 10, 2024
1 parent 6a84710 commit 9320ca7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jte/src/main/java/gg/jte/compiler/TemplateParser.java
Expand Up @@ -1122,7 +1122,7 @@ public Indent(Mode mode, int amount) {
public static class HtmlTag implements gg.jte.html.HtmlTag {

// See https://www.lifewire.com/html-singleton-tags-3468620
private static final Set<String> VOID_HTML_TAGS = new HashSet<>(Arrays.asList("area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"));
private static final Set<String> VOID_HTML_TAGS = Set.of("area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr");

public final String name;
public final boolean intercepted;
Expand Down Expand Up @@ -1205,7 +1205,7 @@ public String getName() {
public static class HtmlAttribute implements gg.jte.html.HtmlAttribute {
// See https://meiert.com/en/blog/boolean-attributes-of-html/
@SuppressWarnings("SpellCheckingInspection")
private static final Set<String> BOOLEAN_HTML_ATTRIBUTES = new HashSet<>(Arrays.asList("allowfullscreen", "allowpaymentrequest", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "ismap", "itemscope", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "selected", "truespeed"));
private static final Set<String> BOOLEAN_HTML_ATTRIBUTES = Set.of("allowfullscreen", "allowpaymentrequest", "async", "autofocus", "autoplay", "checked", "controls", "default", "defer", "disabled", "formnovalidate", "hidden", "inert", "ismap", "itemscope", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "selected", "truespeed");

public final String name;
public final char quotes;
Expand Down

0 comments on commit 9320ca7

Please sign in to comment.