Immutable
release. Only release title and notes can be modified.
Release Notes
The project was renamed from afm to aozora-flavored-markdown for its
first crates.io release (ADR-0015). The
descriptive crate name (aozora-flavored-markdown,
binary aozora-flavored-markdown) is decoupled from the short, stable
aozora-md brand used for the rendered HTML CSS classes (aozora-md-*), env
vars (AOZORA_MD_*), Docker tags, and the aozora-md.diagnostics.v1
diagnostics schema — see
ADR-0016. The version is
aligned with the sibling aozora crate at 0.4.1, and Options::afm_default()
is replaced by Options::default() (the dialect preset is now the Default).
Added
just setup— one-shot first-time setup (build the dev image,
install git hooks, runjust doctor, run the tests); idempotent, so
it doubles as a "get back to green after a pull" command.just snapshot-review/just snapshot-accept— drivecargo instafor the snapshot tests thatjust test(nextest) leaves
pending but does not apply.just prop-seed SEED— replay a single proptest failure from the
seed nextest prints on its FAIL line.- Grouped
justmenu — every recipe carries a[group(...)], so a
barejustlists recipes by area (build / test / lint / docs / …);
the destructivenukeis now guarded behind[confirm]. - Contributor
Troubleshooting+Your first changeguide in
CONTRIBUTING.md— the common Docker / cargo-lock / sccache /
rust-analyzer-in-container / WSL snags with their fixes, and a six-step
first lap through the inner loop. - PR area auto-labeler (
actions/labeler) — tags a PRarea: cli/
markdown/wasm/book/dev/ci/documentationfrom the
paths it touches. Non-blocking and not a required check. - stdin input for
aozora-flavored-markdown render/aozora-flavored-markdown check— pass-as the input
path to read the document from standard input (cat in.md | aozora-flavored-markdown render -), honouring--encoding sjison the piped byte stream. The-
placeholder was already documented but previously errored. aozora-flavored-markdown render -o <file>/--output— write HTML straight to a file
instead of redirecting stdout (-keeps stdout); strict failures write
nothing.--color auto|always|neverfor error reports —autohonours
NO_COLORandCLICOLOR_FORCEand otherwise follows the stderr TTY; an
explicitalways/neverwins over the environment.-v/-qverbosity flags — set the default log level without
reaching forRUST_LOG(which still overrides them when set).--format human|jsonmachine-readable diagnostics —jsonemits a
stableaozora-md.diagnostics.v1envelope (code/severity/source/
message/span/line/column) for editors, CI gates, and LSP
bridges.checkwrites it to stdout (pipe intojq);renderkeeps
stdout for HTML and writes JSON to stderr. Schema and stability are
pinned by ADR-0012.aozora-flavored-markdown completions <shell>— generate a completion script for bash,
zsh, fish, powershell, or elvish.--helpnow shows anEXAMPLESsection covering stdin,-o,
strict JSON checks, and completion install.- Release archives now bundle the shell completions and the
aozora-flavored-markdown.1
man page (undercompletions/andman/). Regenerate the committed
assets withjust dist-assets;just cidrift-checks them. - Runnable doctests on the
aozora-flavored-markdownpublic API — every public
entry point (render_to_string,render_to_ir,render_blocks_to_ir,
serialize,Options::default,html::render_to_string) now
carries a compiled, asserted example.just test-docis wired into
just ciand a CI job so the examples can never silently rot. - crates.io publication readiness —
aozora-flavored-markdownandaozora-flavored-markdown-cliare now
publishable to crates.io (verified viacargo publish --dry-run). A manual
publish-crates.ymlworkflow publishes the two-crate ladder
(aozora-flavored-markdown→aozora-flavored-markdown-cli). Policy is captured in
ADR-0014 and
ADR-0015.
Changed
just ciis faster without dropping a gate. The non-compile gates
(deny/audit/book-build) run in a background lane that
overlaps the compile lane, and the redundantcheckstep plus the
duplicatefmt-check/typos/strict-coderuns thatlint
bundled are removed. Same 18 gates; warm-cache wall-clock ~35 s
→ ~23 s. The compile lane stays sequential (one shared cargo target
lock).justrecipes are container-aware — no more docker-in-docker. Run
inside the dev/ci image (ajust shell, a VS Code devcontainer, or a
GitHub Codespace, whereAOZORA_MD_IN_CONTAINER=1), recipes invoke their
tool directly instead of nesting a seconddocker compose run. The
devcontainer now targets the full-toolciimage, so the complete
just ciruns inside Codespaces, andpostCreateCommandinstalls the
git hooks.just strict-codenow permits reasoned#[allow(..., reason = "…")]
(Rust 1.81+) and forbids only bare#[allow]— matching the
clippy::allow_attributes_without_reasonlint the workspace already
enforces, which the previous blanket ban contradicted. It also adds an
.expect()regression tripwire overaozora-flavored-markdownsource (baseline 8)
and thecargo-denyallow-wildcard-pathspolicy for path-only
internal dev-deps.- CI collapses to a single
ci-successrequired check. A
dorny/paths-filterchangesjob skips the Rust compile/test/lint
matrix on docs-only PRs, and a terminalci-successaggregator gates
on every job's result, so branch protection requires justci-success
(plus CodeQL) — adding or renaming a job no longer needs a settings
change. Thelintjob is now a parallel matrix (fmt-check / clippy /
typos / strict-code), and the completions/man drift check
(dist-assets-check) and doctests (test-doc) are first-class CI jobs. - Public IR enums
IrBlock/IrInlineare now#[non_exhaustive]
(ADR-0013) so a future
青空文庫 notation can be added as a new variant without breaking external
Rustmatches. The serde/JSON contract is unchanged; the variant-
completeness witnesses moved intoaozora-flavored-markdown(the owning crate). The
ADR index now also lists the previously-missing ADR-0012. aozorais now a crates.io registry dependency (0.4.1) instead of a
git-rev pin — required for aozora-flavored-markdown to be publishable.comrakkeeps its
vendored path locally but publishes against the identical registry0.52.0.
cargo xtask new-adrnow rendersdocs/adr/0000-template.md(full MADR
section set) instead of a hard-coded subset.- MSRV raised to Rust 1.96.0, aligning
rust-toolchain.toml, the workspace
rust-version,clippy.toml, the mise/CI pins, and the README badge with the
rust:1.96.0dev-image base (which previously forced a redundant 1.95.0
rustup install). Dependabot now ignores the Dockerrustbase so a bump
can't silently advance the MSRV.
Fixed
aozora-flavored-markdown --strictnow exits with code 2, distinct from generic
failures (code 1), matching the documented exit-code table; its
--helptext now describes "any lexer diagnostic" instead of the
stale "unknown annotation" wording.- Dead
CLAUDE.mdlink in the README (the file is personal and not
committed); readers are pointed atCONTRIBUTING.mdanddocs/adr/.
Internal
- Aozora sentinel splicing moved from byte-stream post-processing to
AST-level mutation (crates/aozora-flavored-markdown/src/post_process.rs
→ast_splice.rs). The splicer now mutates comrak's typed AST in place
(replacing each sentinel with aNodeValue::Rawnode) and lets
comrak::format_htmlemit the final HTML in one pass, rather than
re-scanning a flat HTML byte stream with the former multi-pass Cow
pipeline. This supersedes the multi-pass design described under
[0.4.0] and withdraws the fully-fused aho-corasick follow-up noted
there — the separate secondary passes it would have fused no longer
exist as distinct scans.
Install aozora-flavored-markdown-cli 0.4.1
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/P4suta/aozora-flavored-markdown/releases/download/v0.4.1/aozora-flavored-markdown-cli-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/P4suta/aozora-flavored-markdown/releases/download/v0.4.1/aozora-flavored-markdown-cli-installer.ps1 | iex"Download aozora-flavored-markdown-cli 0.4.1
| File | Platform | Checksum |
|---|---|---|
| aozora-flavored-markdown-cli-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
| aozora-flavored-markdown-cli-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
| aozora-flavored-markdown-cli-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
| aozora-flavored-markdown-cli-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
| aozora-flavored-markdown-cli-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |