summaryrefslogtreecommitdiff
path: root/src/compiler/parse/state/setup.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/parse/state/setup.ts')
-rw-r--r--src/compiler/parse/state/setup.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/parse/state/setup.ts b/src/compiler/parse/state/setup.ts
index b3c21b106..f64d8c52b 100644
--- a/src/compiler/parse/state/setup.ts
+++ b/src/compiler/parse/state/setup.ts
@@ -3,6 +3,14 @@
import { Parser } from '../index.js';
export default function setup(parser: Parser): void {
+ // TODO: Error if not at top of file? currently, we ignore / just treat as text.
+ // if (parser.html.children.length > 0) {
+ // parser.error({
+ // code: 'unexpected-token',
+ // message: 'Frontmatter scripts only supported at the top of file.',
+ // });
+ // }
+
const start = parser.index;
parser.index += 3;
const content_start = parser.index;