diff options
| author | Joe Carstairs <me@joeac.net> | 2026-03-21 20:34:44 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-03-21 20:34:44 +0000 |
| commit | 76766d5f29d02f3a90b15b00612dc459ef5afe59 (patch) | |
| tree | 72d52e1ca40492f607508b429b30bd89fe8418eb /src | |
| parent | 55b965b9fe7fb1cc44c6c8fbf34aa60377fe7db9 (diff) | |
fix off-by-one error in isolating raw frontmatter
Diffstat (limited to 'src')
| -rw-r--r-- | src/index.ts | 2 |
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 { } |
