summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-03-21 20:34:44 +0000
committerJoe Carstairs <me@joeac.net>2026-03-21 20:34:44 +0000
commit76766d5f29d02f3a90b15b00612dc459ef5afe59 (patch)
tree72d52e1ca40492f607508b429b30bd89fe8418eb /src
parent55b965b9fe7fb1cc44c6c8fbf34aa60377fe7db9 (diff)
fix off-by-one error in isolating raw frontmatter
Diffstat (limited to 'src')
-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 { }