Skip to content

About

Markdown normalization tasks for Bake.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

26 Commits

Folders and files

Repository files navigation

bake-markdown

Markdown normalization for Bake projects. It joins soft source line breaks in Markdown files while preserving explicit hard breaks, code, and block boundaries.

Motivation

Hard-wrapped paragraphs are difficult to edit consistently. This crate uses the base-markdown syntax tree and serializer so normalization follows Markdown structure instead of changing lines with regular expressions.

Usage

Add the crate to the project's private bake/ package and regenerate its task links:

cargo bake --regenerate
cargo add --manifest-path bake/Cargo.toml bake-markdown
cargo bake --regenerate

Normalize one or more files relative to the project root:

cargo bake markdown:normalize readme.md context/guide.md

Rust callers can use bake_markdown::normalize_document directly.

Releasing

Prepare a release with cargo bake cargo:release:patch (or minor, major, or bump --version X.Y.Z) from a clean checkout of main; it bumps the version, commits with the Release: vVERSION trailer, validates the candidate, and opens the pull request. After review and merge, GitHub Actions publishes the release when the configured crates-io environment approves it. Follow the shared Releasing skill for the standard process.

Releases

See releases.md for the full release history.

v0.6.2

  • Require bake 0.20 or later, instead of 0.19 or later, so that Cargo resolves this crate to the same bake as a task package that requires bake 0.20.2. In a workspace whose rust-version is below the 1.88 that bake 0.20.2 declares, Cargo resolved the old requirement to bake 0.19.2, which declares none, and the task package failed to compile against two bake versions.

v0.6.1

  • Normalize through base_markdown::normalize_markdown, which now owns the normalization rules, so markdown:normalize and other tools built on base-markdown, such as bake-readme, write identical Markdown. Requires base-markdown 0.1.3.
  • Raise the minimum supported Rust version in rust-version from 1.85 to 1.88, as the let-chains in bake-macros 0.20 already require.

v0.6.0

  • Depend on base-markdown under the base-rs organization, replacing core-markdown. Callers passing explicit ParseOptions or naming parser errors must use the corresponding types from base-markdown.

See Also

base-markdown provides the parser and serializer used by this crate.

Contributing

Please open an issue or pull request on GitHub.

Agent Context

Run cargo bake agent:context:install to install shared context and skills. Read .agents/context/index.md to find relevant guides, follow agents.md if present, and apply skills under .agents/skills/. The installer preserves repository-owned agents.md; it does not create or regenerate that file.

About

Markdown normalization tasks for Bake.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages