Skip to content

Latest commit

 

History

History
412 lines (351 loc) · 21.5 KB

CHANGELOG.md

File metadata and controls

412 lines (351 loc) · 21.5 KB

Changelog

All notable changes to acdc-cli will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Added

  • The terminal-images feature shows images in terminals that support the kitty graphics protocol, such as kitty, Ghostty and Rex, including remote SVG badges with network and -a allow-uri-read. Images work through the default less pager. Versions of less without LESSUTFCHARDEF show <U+10EEEE> instead.
  • convert --images auto|always|never chooses when terminal output shows images. auto, the default, shows them in kitty, Ghostty and Rex, which it recognizes from TERM (xterm-kitty, xterm-ghostty, xterm-rex), TERM_PROGRAM (ghostty, rex) or kitty's KITTY_WINDOW_ID. It doesn't ask the terminal, so keys typed before the pager opens reach the pager. Inside tmux, screen or Zellij, in other terminals, and on Windows, auto shows the alternative text; use always for another terminal that supports the kitty graphics protocol. never shows [Image: alt] and the image's link instead.
  • The network feature also enables remote images in terminal output.
  • Terminal output has clickable links in Rex, and in Ghostty and kitty when TERM is generic, such as xterm-256color.

Changed

  • With a pager, terminal output starts once every input is converted, and a failed input's error shows after you quit the pager.

Fixed

  • acdc convert now fails with an error when it can't write all of its output, for example on a full disk or to a closed pipe. It used to print "Generated ... file" and exit successfully, leaving the output truncated.

0.4.2 - 2026-11-29

Changed

  • Linux binaries need glibc 2.28 or later, instead of 2.35. They now run on RHEL 8 and 9, Debian 10 and 11, and Ubuntu 20.04.

0.4.1 - 2026-11-28

Changed

  • Binaries are about 20 MB smaller. The bundled emoji font for PDF output no longer carries glyph data that nothing reads. PDF output doesn't change.
  • A panic now exits with status 101 instead of aborting the process.

Fixed

  • Windows binaries no longer need the Visual C++ Redistributable.

0.4.0 - 2026-11-28

Breaking changes

  • Conversion recognizes underlined (setext) headings by default. This matches Asciidoctor. The convert --setext and --enable-setext-compatibility flags are removed. Drop them from your commands.
  • The pre-spec-subs and setext Cargo features are removed. Remove them from your feature lists. The compatibility mode now selects the language rules, and block subs= works in every build.
  • HTML highlighting reads only highlight-style and highlight-css, with giallo theme names. Replace syntect-style and syntect-css.
  • Manpage dates come from docdate, not revdate, as in Asciidoctor. Set docdate to pin the printed date.

Added

  • acdc parse exports native JSON from a file or stdin. It accepts --compatibility-mode. --type inline parses an inline fragment. Builds with asg add --format upstream-asg and --format acdc-asg-v1. Diagnostics go to stderr as JSON lines.
  • convert, inspect, lint and execute accept --compatibility-mode asciidoctor|draft. The default is asciidoctor. The mode also applies to includes and table cells.
  • convert --force-local-file-xrefs resolves file references such as <<other.adoc#id>> to local anchors, for combined documents. It can also redirect real external references. Asciidoctor doesn't do this.
  • convert --fail-on-warnings exits with status 1 on any warning. It still processes every input and writes all successful output. This is like Asciidoctor's --failure-level WARN.
  • convert --backend pdf --theme FILE --theme-format asciidoctor loads an Asciidoctor PDF 2.3.15 theme. Unsupported settings show warnings. --emit-theme-config FILE writes the resolved theme as acdc YAML, to pass back with --theme.
  • convert --backend pdf --image-concurrency N fetches up to N remote images at once. The default is 2.
  • acdc lint has three document-structure lints for attribute entries, on by default: attribute-name-not-normalized, header-only-attribute and unset-attribute-value.

Changed

  • Conversion continues after recoverable parser errors and reports them as warnings. This includes nonconforming manpage titles, which --strict still rejects.
  • Manpage conversion keeps the manpage doctype, even with --doctype article or --doctype book.
  • The tck adapter uses Draft mode and exports a smaller upstream ASG.
  • Release archives are named acdc-cli-TARGET.tar.gz (.zip on Windows), with an acdc-cli-TARGET.sha256 checksum. Each unpacks to an acdc-cli-TARGET directory that also holds README.adoc and CHANGELOG.md.

Deprecated

  • toc2 settings now show one warning per document. Use :toc: left or -a toc=left instead.

Fixed

  • inspect now lists block controls in name order and shows the complete video target.
  • acdc lint reports fewer false positives from counter-syntax, attribute-url-prefix and one-sentence-per-line. Image checks read the parsed alt text.
  • acdc execute commands can use a [[id]] anchor as their ID. With subs=attributes, attribute names in scripts follow the compatibility mode.
  • Windows release builds are back.

Output

All backends

  • Footnotes in AsciiDoc table cells show their own text. Description lists keep every term of a shared definition.
  • HTML, manpage and terminal tables with mixed widths, such as cols="2*3,~", keep their numeric proportions, as in Asciidoctor.
  • Blocks attached to a list item with + stay inside the item and line up with its text.
  • Substitutions, character references, cross-references, captions, media links and index terms match Asciidoctor more closely.

HTML

  • [%interactive] checklists have clickable checkboxes. [qanda] lists show as numbered questions, as in Asciidoctor.
  • Output applies noheader, nofooter and nofootnotes. Standalone output applies eqnums.
  • SVG images support opts=inline and opts=interactive. data-uri embeds images. Remote images also need allow-uri-read and a network build.
  • Links apply opts=nofollow and opts=noopener. File cross-references use relfileprefix and relfilesuffix.
  • Highlighting uses giallo. The default theme is github-light, or github-dark with :dark-mode:.
  • IDs, roles and titles can no longer inject HTML.

PDF

  • Page breaks with page-layout=portrait|landscape change the orientation of later pages. Themes can set page size, margins and orientation under page.
  • A document can load up to 1,024 image sources and 100 MiB of image data. Images over a limit show fallback text and a warning, or an error with --strict.
  • Typography such as (C), ... and -- shows as symbols, also in backticks, as in Asciidoctor PDF.
  • Nested ordered lists no longer inherit start or %reversed.

Manpage

  • xref:guide.adoc[] uses the local guide label when one exists, as in Asciidoctor.
  • A literal NAME heading no longer warns when manname-title is custom or empty.
  • Nested ordered lists use a., i., A. and I. by level. Wide markers such as viii. stay on the item's line.
  • The Generator comment now shows the acdc version, not the converter's own.

Markdown

  • Reversed ordered lists count up from start, with a warning. Markdown can't number down.
  • Literal angle brackets, backslashes and ampersands stay visible. Block image title= adds a caption.

Terminal

  • Nested ordered lists use a., i., A. and I. by level. Ordered list markers align to the widest one.
  • Lines selected with highlight= keep their background under syntax colors.
  • A colored inline span, such as monospace, restores the color around it.

0.3.0 - 2026-10-10

Added

  • --max-total-include-bytes BYTES sets the total selected include text allowed per input document on convert, lint, inspect, and execute. The default is 64 MiB. Raise it for large, trusted builds. Safe modes and the 10 MiB per-include limit still apply. Document attributes cannot change this budget. This resource limit deliberately differs from Asciidoctor.
  • Native binary release packaging for macOS ARM64/x86-64, Linux ARM64/x86-64, and Windows x86-64, with SHA-256 checksums. The binaries include all CLI features, including all five output backends, developer tools, and the TCK adapter. Linux binaries target glibc 2.35 or later.
  • lint and inspect accept -S / --safe-mode. Like convert, they default to Unsafe and continue expanding local includes. Use Secure to prevent include reads. execute continues to default to Safe.
  • A new lint command is available by default. It accepts files or --stdin and Clippy-style lint level flags (--allow/-A, --warn/-W, --deny/-D, --forbid/-F) for the initial Asciidoctor recommended practices lint names. The document-title-author and document-title-revision lints are available by name but are not part of the recommended-practices group. Counter naming is not exposed as a lint because acdc already warns that counters are unsupported and removes them from output.
  • acdc lint now renders full colored diagnostics by default, including source snippets, lint IDs, labels, and help text. Use --output-style=compact for compact line:column diagnostics without colors or snippets.
  • Full acdc lint output now ends with lint statistics that count diagnostics by lint ID for the run.
  • acdc lint level flags now accept location-scoped overrides for individual lint IDs, such as -A section-title-capitalization@37 or -D image-alt-text@10:1-10:80. Multiple locations can be comma-separated in one flag, such as -A delimited-block-minimal-delimiter@977,968. If a scoped override no longer matches any diagnostic, the lint run reports the stale location.
  • --backend pdf is now available when the pdf or all-backends feature is enabled. It writes .pdf files by default and writes raw PDF bytes when -o - is selected. PDF runs accept --font-dir, --logo, --title, --watermark, --watermark-timestamp, --page, --theme, --plain, --page-layout, --toc, and --emit-typst; named A3/A4/A5 and common US page sizes can use portrait or landscape output, pdf-page-size accepts custom dimensions, pdf-page-margin sets per-document margins, and --strict makes unresolved PDF images or logos fail instead of falling back with a warning.
  • Builds with the execute feature run listing and source blocks marked with the command role. Use --id or --id-regex to select commands and their dependencies, --dry-run to inspect scripts, and --list to see descriptions. interpreter= overrides the source language; --cwd and repeated --env options configure child processes.
  • Command execution preserves literal script text after includes and conditionals; subs=attributes or subs=+attributes expands document attributes from each command's source position without shell quoting or removing callouts. Missing enabled attributes and incomplete command input fail before any process starts. Dry-run shows the prepared script. Builds without pre-spec-subs reject explicit subs settings. Failed commands block dependents while independent commands continue; --exit-on-failure stops sooner. Source diagnostics identify commands in included files.
  • The terminal-emulator build feature renders [terminal] session blocks through libghostty-vt on the --backend terminal path. Requires a Zig toolchain to build the bundled library, which is statically linked so the binary stays self-contained.
  • The html-terminal feature forwards terminal-styled HTML rendering to the HTML converter. The :acdc-terminal: document attribute opts terminal-like source blocks into selectable preview rendering; Asciidoctor does not provide this attribute or an equivalent built-in feature.
  • Explicit [terminal] blocks now render in HTML output when the html-terminal feature is enabled. [terminal] is the terminal-session path: it renders transcripts through libghostty-vt as selectable styled HTML and does not require the :acdc-terminal: source-block opt-in. It supports per-block cols= and rows= attributes and follows the document :dark-mode: setting. [terminal] is an acdc-only block style: Asciidoctor renders it as a plain listing or literal block with the raw text (ANSI escapes included) left as-is.
  • Converter warnings are now rendered on stderr with the same miette warning styling used for parser warnings.
  • convert --open now opens converter-reported output files, including volume-aware manpage outputs such as cmd.1 and cmd.7.
  • --variant flag for convert — pick a backend-specific output style. HTML: standard (default) or semantic. Markdown: commonmark or gfm (default). --backend html5s remains an alias for --backend html --variant semantic and rejects --variant. Invalid combinations are rejected up-front, and unavailable backends or variants are omitted from command help.
  • Timing summary table for multi-file conversions — when convert is invoked with --timings and more than one input file, a summary table is printed after the per-file output with parse time, convert time, total per-file time, and wall-clock time across the batch. Single-file output is unchanged.
  • Parser warnings on stderr — non-fatal parser warnings (section level out of sequence, unknown table formats, missing includes, ifdef/endif mismatches, etc.) are now shown on stderr with the same colored source-snippet treatment as errors: a yellow caret, framed source excerpt, span marker, and an optional help: line. Previously these were silent without a tracing subscriber.

Changed

  • execute --list now prints one bullet per command with labeled ids, interpreters, enclosing section titles, direct dependencies, and optional descriptions. Commands outside sections omit the section title. Quoted values escape control characters so each command stays on one line.

Fixed

  • Warning batches read each referenced source file once, reducing repeated I/O for documents with many warnings, including commands that use subs=attributes.
  • lint -D one-sentence-per-line now rejects description-list values with multiple sentences on one line or a sentence split across lines, including values written after the term's delimiter.
  • lint -D one-sentence-per-line no longer rejects correctly separated sentences or colon-terminated lead-ins that use inline formatting. Multiple formatted sentences on one source line now fail the check.
  • Repeated -a options now use the final assignment's precedence, matching Asciidoctor. A later default such as -a name=value@ or -a !name=@ cancels an earlier override and lets the document assign that attribute.
  • convert -a skip-front-matter makes captured front matter available to conditionals and includes. HTML conversion warns about excessive source indentation instead of panicking.
  • Serialized parser output now keeps document attributes as an end-of-header snapshot and reports accepted body set and unset entries in source order.
  • convert -a attributes now remain locked against matching set or unset entries in the document. The Asciidoctor-compatible @ suffix makes a value a document-overridable default, including name@=value, name=value@, and soft unset forms such as !name=@.
  • Implied and conversion-only values such as the default lang=en, outdir, and outfile are no longer inserted into parser attributes. Converters keep their output fallbacks, while an unresolved attribute reference stays unresolved. outdir and outfile remain conversion-result metadata even when matching -a options are supplied.
  • convert makes the selected backend's attributes and the converter's default attributes available while the document is parsed, so backend conditionals such as ifdef::backend-pdf[] and references to backend, basebackend, filetype, outfilesuffix, and htmlsyntax reflect the chosen output during parsing — consistently for stdin, single-file input, and multi-file batches.
  • CLI subcommand errors now exit with a non-zero status after rendering the error message. This includes acdc lint runs with denied diagnostics.
  • Missing convert and lint inputs now produce normal command usage errors, unsupported TCK input types return a regular command failure, and multi-file conversion failures are reported without bypassing top-level error handling.
  • A warning that points into an include::d file (or any content shifted by the preprocessor) now renders its source snippet against the correct file instead of aborting with Failed to read contents … OutOfBounds.
  • Diagnostics for empty files, multi-byte UTF-8 text, and stale or out-of-range locations now clamp to valid source spans instead of producing an invalid source-snippet range.
  • --no-default-features builds no longer re-enable parser default features through internal workspace dependencies.
  • Peak memory during multi-file conversion is now bounded by active work; parsed documents are released after their conversion instead of being retained for the complete input batch.
  • Terminal backend warnings are now visible. Parser and converter warnings emitted during a --backend terminal run with a pager were previously written to stderr before the pager took over the screen, leaving them visually buried. They are now deferred until after the pager exits, and the no-pager terminal paths also render converter warnings, including file input converted with --out-file.
  • A PDF-only build (--no-default-features --features pdf) now exposes the convert command instead of reporting that the binary has no subcommands.
  • Default builds now include the runtime convert --setext compatibility flag, with --enable-setext-compatibility retained as an alias. The highlighting build feature now also enables terminal-backend source highlighting when that backend is selected.
  • inspect now resolves includes relative to the inspected file, handles long Unicode text without panicking, renders accurate tree relationships, and omits ANSI styling when output is redirected.

0.2.0 - 2026-03-28

Added

  • Automatic pager for terminal output - When using --backend terminal and stdout is a TTY, output is automatically piped through a pager. Defaults to less -FRX on Unix and more on Windows. Respects the PAGER environment variable for custom pagers. Use --no-pager to disable, or set PAGER="". On Unix, sets LESSCHARSET=utf-8 for proper UTF-8 display. (#311)
  • --embedded / -e flag to output embeddable content without document wrapper elements. Behaviour varies by backend: HTML skips DOCTYPE/html/head/body/content wrapper, manpage skips preamble and NAME section, terminal skips header/authors/ revision info. Matches asciidoctor's --embedded behaviour. (#272)
  • Index catalog rendering for HTML - Documents with [index] sections now generate a fully populated index catalog, organized alphabetically by first letter with hierarchical nesting for secondary and tertiary terms. Each entry links back to the source location via inline anchors. This goes beyond asciidoctor's HTML backend which leaves index sections empty. The index only renders when it's the last section in the document.
  • Semantic HTML5 backend — --backend html5s produces semantic HTML5 output with proper elements and ARIA roles instead of div-based layout. (#329)
  • --open flag to open generated output files after conversion using the system's default application (e.g., browser for HTML). Ignored when output goes to stdout. (#330)

Fixed

  • Horizontal description lists ([horizontal]) now render as <table> with hdlist class instead of <dl> with dlist horizontal, matching asciidoctor output (#270)
  • List titles (.My title syntax) now render correctly in HTML and manpage output. HTML uses <div class="title">, manpage uses bold formatting, matching asciidoctor behaviour. Terminal output already supported this. (#273)

0.1.0 - 2026-01-02

This is tagged but unreleased in crates.io for now.

Added

  • Description lists now support roles (e.g., [.stack]) which are applied to the wrapper <div> element, matching asciidoctor behaviour (#264)

Changed

  • Removed dependency on acdc-core (purely internal change so no need to bump minor version)