it('handles frontmatter with title', () => {
    const text = `---\ntitle: foo\n---\ndiagram`;
    expect(extractFrontMatter(text)).toMatchInlineSnapshot(`
      {
        "metadata": {