Skip to content

Commit 8b1cecd

Browse files
authored
Add inert attribute to boolean list (#12729)
* added changeset * added changeset
1 parent ee66a45 commit 8b1cecd

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/twelve-donuts-hide.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'astro': patch
3+
---
4+
5+
"Added `inert` to htmlBooleanAttributes"

packages/astro/src/runtime/server/render/util.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { HTMLString, markHTMLString } from '../escape.js';
77
export const voidElementNames =
88
/^(area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/i;
99
const htmlBooleanAttributes =
10-
/^(?:allowfullscreen|async|autofocus|autoplay|checked|controls|default|defer|disabled|disablepictureinpicture|disableremoteplayback|formnovalidate|hidden|loop|nomodule|novalidate|open|playsinline|readonly|required|reversed|scoped|seamless|selected|itemscope)$/i;
10+
/^(?:allowfullscreen|async|autofocus|autoplay|checked|controls|default|defer|disabled|disablepictureinpicture|disableremoteplayback|formnovalidate|hidden|inert|loop|nomodule|novalidate|open|playsinline|readonly|required|reversed|scoped|seamless|selected|itemscope)$/i;
1111

1212
const AMPERSAND_REGEX = /&/g;
1313
const DOUBLE_QUOTE_REGEX = /"/g;

0 commit comments

Comments
 (0)