Skip to content

feat(md013): check and reflow frontmatter values according to line-length - #998

Merged
rvben merged 2 commits into
rvben:mainfrom
guillp:feat/md013_frontmatter
Nov 12, 2026
Merged

rvben merged 2 commits into
rvben:mainfrom
guillp:feat/md013_frontmatter

Conversation

@guillp

@guillp guillp commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

This is an implementation of #996.

When MD013 is enabled and configured withfront-matter = true, this checks line length of frontmatter entries.
When reflow = true, this also tries to wrap long lines in front-matter to the configured line-length without altering their values.
Only YAML and TOML front-matter can be reflowed this way.

The configured reflow-mode has no effect on the reflowing. I did not want to implement similar but slightly different reflow modes for front-matter. Slight differences are because front-matter is not Markdown. Markdown specific syntax doesn't matter. Keys and indentation matter for lenght calculation, etc.
Since front-matter is not prose, simple wrapping should be enough.

@rvben
rvben marked this pull request as ready for review November 12, 2026 20:54
@rvben
rvben merged commit c40744c into rvben:main Nov 12, 2026
15 checks passed
@rvben

rvben commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Thanks @guillp for this improvement! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants