Skip to content

[JEWEL-1277] Add FrontMatter metadata block support for Markdown#3454

Draft
AlexVanGogen wants to merge 1 commit intoJetBrains:masterfrom
AlexVanGogen:alexvangogen/JEWEL-1277-front-matter-support
Draft

[JEWEL-1277] Add FrontMatter metadata block support for Markdown#3454
AlexVanGogen wants to merge 1 commit intoJetBrains:masterfrom
AlexVanGogen:alexvangogen/JEWEL-1277-front-matter-support

Conversation

@AlexVanGogen
Copy link
Contributor

@AlexVanGogen AlexVanGogen commented Mar 9, 2026

Summary

Add support for YAML front matter metadata blocks in Jewel's Markdown rendering. Front matter content (delimited by --- markers at the beginning of a file) is parsed and rendered as a table where keys form the header row and values form the data row. Multi-value (list) entries are rendered as nested tables within cells.

Fixes JEWEL-1277

Changes

  • New front-matter extension module (intellij.platform.jewel.markdown.extensions.frontMatter) with a FrontMatterProcessorExtension that integrates with Jewel's Markdown processor pipeline
  • Custom block parser (FrontMatterBlockParser) supporting plain key-value pairs, YAML lists, quoted strings, and block scalars (literal | and folded > with all chomping indicators)
  • Refactored gfm-tables Table model classes (TableBlock, TableCell, TableHeader, TableRow) from internal to public experimental API to allow reuse by front matter rendering
  • Changed TableBlock.header to nullable (TableHeader?) to support headerless tables (used for nested value tables)
  • Changed TableCell.content from List<InlineMarkdown> to MarkdownBlock to support block-level content in cells (e.g., nested tables)
  • Updated GitHubTableBlockRenderer to render block content in cells via RenderBlock instead of RenderParagraph
  • Added 22 unit tests covering various front matter scenarios including block scalars, lists, quoted values, and edge cases

Evidence

Screen.Recording.2026-03-09.at.18.58.35.mov

Release notes

New features

@AlexVanGogen AlexVanGogen force-pushed the alexvangogen/JEWEL-1277-front-matter-support branch from 5cff30b to 48efc38 Compare March 9, 2026 19:23
@AlexVanGogen AlexVanGogen force-pushed the alexvangogen/JEWEL-1277-front-matter-support branch from 48efc38 to 8aea4d1 Compare March 10, 2026 17:54
@AlexVanGogen AlexVanGogen force-pushed the alexvangogen/JEWEL-1277-front-matter-support branch from 8aea4d1 to bc78700 Compare March 10, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants