summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts
index 4072551..f5e0d9b 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -42,7 +42,7 @@ export default function gemtext(config: GemtextConfig = {}): AstroIntegration {
if (lines.at(0) === '---' && lines.lastIndexOf('---') > 0) {
bodyStartLineIndex = lines.indexOf('---', 1) + 1;
- frontmatter = lines.slice(1, bodyStartLineIndex).join('\n');
+ frontmatter = lines.slice(1, bodyStartLineIndex - 1).join('\n');
try {
data = { ...data, ...parseYaml(frontmatter, { schema: 'yaml-1.1' }) };
} catch { }