summaryrefslogtreecommitdiff
path: root/src/frontend/h.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/h.ts')
-rw-r--r--src/frontend/h.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/frontend/h.ts b/src/frontend/h.ts
index cd94583f8..70965e135 100644
--- a/src/frontend/h.ts
+++ b/src/frontend/h.ts
@@ -6,6 +6,15 @@ export type HTag = string | AstroComponent;
const voidTags = new Set(['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']);
function* _h(tag: string, attrs: HProps, children: Array<HChild>) {
+ if(tag === '!doctype') {
+ yield '<!doctype ';
+ if(attrs) {
+ yield Object.keys(attrs).join(' ');
+ }
+ yield '>';
+ return;
+ }
+
yield `<${tag}`;
if (attrs) {
yield ' ';