From b547ca261f478c96f5a762c0784914e3148e5dbd Mon Sep 17 00:00:00 2001 From: Amin Borghei Date: Thu, 1 Oct 2026 18:27:25 +0200 Subject: [PATCH 1/2] chore(release): v0.10.0 - mermaid: layered flowchart layout, state/class/ER diagrams, Gantt axis, mindmaps - interactive table of contents, clickable links, open in $EDITOR - math as Unicode, table alignment, superscript/spoilers/definition lists, frontmatter box, --line-range - fix: exit instead of spinning when the terminal hangs up --- CHANGELOG.md | 22 ++++++++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 4 ++-- docs/index.html | 6 +++--- docs/llms-full.txt | 4 ++-- docs/llms.txt | 4 ++-- install.ps1 | 2 +- install.sh | 2 +- 9 files changed, 35 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fad348d..24ddda7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## 0.10.0 — 2026-10-01 + +### Added +- **Mermaid diagrams are laid out, not listed.** Flowcharts used to print as a list of edges; they now draw each node once as a box, with routed edges, arrowheads, edge labels, node shapes and subgraph frames, in every direction (TD, BT, LR, RL). State, class and ER diagrams, which printed as raw source, use the same layout. Gantt charts get a scaled time axis, mindmaps draw as a tree, and unsupported diagram types show their source in a titled box. (#26) +- **Interactive table of contents.** `o` moves focus into the sidebar: move with `j`/`k`, jump with Enter, fold subtrees with `h`/`l`, filter headings with `/`. A click on a row jumps to it. (#24) +- **Clickable links.** With mouse capture on, clicking a link follows it; dragging still selects. (#24) +- **Open in your editor.** `e` opens the current file in `$VISUAL`/`$EDITOR` at the section you are reading and reloads it when the editor exits. (#24) +- **Math renders as Unicode.** `$…$`, `$$…$$` and ```` ```math ```` blocks show Greek letters, operators, fractions, roots, sub/superscripts, matrices and `cases` instead of raw LaTeX. Prices like "$5 and $10" are left alone. (#25) +- **Table column alignment.** `:--`, `--:` and `:-:` are honoured. (#25) +- **More markdown.** Superscript `^x^`, spoilers `||x||`, definition lists, callouts with custom titles (`> [!NOTE] Title`, including Obsidian types), and ``/`` as real sub/superscripts. (#25) +- **Frontmatter box.** With `--frontmatter`, YAML, TOML and JSON frontmatter render as a key/value box instead of being parsed as markdown. (#25) +- **`--line-range START:END`** renders only those source lines in `--plain`, `bat`-style. (#25) + +### Changed +- Enter follows the first followable link anywhere on screen, web and mail links included; it used to look only at the top few lines and only at local links. (#24) +- A paragraph followed by a line starting `: ` is now a definition list, ```` ```math ```` blocks render as math rather than a code box, and JSON frontmatter is stripped by default like YAML and TOML. (#25) +- The table of contents highlights the heading `n`/`N` jumped to and scrolls to keep it visible. (#24) + +### Fixed +- **A hung-up terminal no longer leaves ink spinning at 100% CPU.** Closing an SSH session or killing tmux left the process running forever; it now exits. (#24) +- crates.io and the Homebrew tap are published by the release workflow again, through crates.io Trusted Publishing and a tap-scoped deploy key, instead of by hand. (#23) + ## 0.9.0 — 2026-10-01 ### Added diff --git a/Cargo.lock b/Cargo.lock index beabfe5..5ac1ffb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1520,7 +1520,7 @@ dependencies = [ [[package]] name = "ink-md" -version = "0.9.0" +version = "0.10.0" dependencies = [ "anyhow", "assert_cmd", diff --git a/Cargo.toml b/Cargo.toml index 9c3dd19..c78c0ef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ink-md" -version = "0.9.0" +version = "0.10.0" edition = "2021" # Highest rust-version declared by any resolved dependency (quantette, via # ratatui-image). CI's msrv job builds with exactly this toolchain. diff --git a/README.md b/README.md index 67a2f3a..0bc8b65 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ curl -fsSL https://raw.githubusercontent.com/borghei/ink/main/install.sh | sh The installer picks the right binary for your OS, CPU and libc (static musl build on Alpine, Raspberry Pi and older-glibc systems), checks it against `SHA256SUMS` and installs to `/usr/local/bin` (using `sudo` only if it has to). Pin a version with `INK_VERSION=v0.8.0` or change the target with `INK_INSTALL_DIR="$HOME/.local/bin"`: ```bash -curl -fsSL https://raw.githubusercontent.com/borghei/ink/main/install.sh | INK_VERSION=v0.9.0 INK_INSTALL_DIR="$HOME/.local/bin" sh +curl -fsSL https://raw.githubusercontent.com/borghei/ink/main/install.sh | INK_VERSION=v0.10.0 INK_INSTALL_DIR="$HOME/.local/bin" sh ``` ### Quick install (Windows PowerShell) @@ -38,7 +38,7 @@ curl -fsSL https://raw.githubusercontent.com/borghei/ink/main/install.sh | INK_V irm https://raw.githubusercontent.com/borghei/ink/main/install.ps1 | iex ``` -Installs `ink.exe` (x64 or ARM64) to `%LOCALAPPDATA%\Programs\ink` and adds it to your user `PATH`. Set `$env:INK_VERSION = "v0.9.0"` first to pin a version. +Installs `ink.exe` (x64 or ARM64) to `%LOCALAPPDATA%\Programs\ink` and adds it to your user `PATH`. Set `$env:INK_VERSION = "v0.10.0"` first to pin a version. ### Homebrew (macOS / Linux) diff --git a/docs/index.html b/docs/index.html index a596e5d..b36e85f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -303,7 +303,7 @@

Inline images

Mermaid diagrams

-

Flowcharts, sequence diagrams, pie charts, and Gantt charts as ASCII art.

+

Flowcharts, state, class and ER diagrams laid out as boxes and arrows, plus sequence, pie, Gantt and mindmaps.

8 themes

@@ -323,7 +323,7 @@

Search

Table of contents

-

Sidebar showing every heading. Tracks your scroll position.

+

Sidebar showing every heading. Press o to move through it, filter, fold, and jump.

Select & copy

@@ -331,7 +331,7 @@

Select & copy

Open links by keyboard

-

Press f to label links, each listed with its text and URL, then a letter to open or follow them.

+

Press f to label links, each listed with its text and URL, then a letter to open or follow them. Or just click one.

Math & emoji

diff --git a/docs/llms-full.txt b/docs/llms-full.txt index 1946bc5..d81b724 100644 --- a/docs/llms-full.txt +++ b/docs/llms-full.txt @@ -33,8 +33,8 @@ ink is a feature-rich terminal markdown reader built in Rust. It renders markdow - Respects --no-images flag ### Mermaid Diagrams -- Renders mermaid code blocks as ASCII art -- Supports flowcharts/graphs, sequence diagrams, pie charts, Gantt charts +- Renders mermaid code blocks as text art; flowcharts, state, class and ER diagrams use a layered layout (each node drawn once, routed edges, TD/BT/LR/RL); unsupported diagram types show their source in a titled box +- Supports flowcharts/graphs, state, class and ER diagrams, sequence diagrams, pie charts, Gantt charts, mindmaps - Unknown diagram types get fallback rendering ### Admonitions diff --git a/docs/llms.txt b/docs/llms.txt index cda2302..848d761 100644 --- a/docs/llms.txt +++ b/docs/llms.txt @@ -8,7 +8,7 @@ ink is a command-line tool that renders markdown files in the terminal with rich - Renders markdown with syntax highlighting, tables (with column alignment), blockquotes, lists, task lists, footnotes, definition lists, superscript (^x^, ) and subscript (), spoilers, and horizontal rules - Displays inline images using terminal graphics protocols (Kitty, iTerm2, Sixel) where supported, falling back to Unicode half-block characters (any true-color terminal); --image-protocol selects the renderer -- Renders mermaid diagrams (flowcharts, sequence diagrams, pie charts, Gantt charts) as ASCII art +- Renders mermaid diagrams as text art: flowcharts (laid out with boxes and routed edges, all directions), state, class and ER diagrams, sequence diagrams, pie charts, Gantt charts and mindmaps - Supports GitHub-style admonitions (NOTE, TIP, IMPORTANT, WARNING, CAUTION) with custom titles, and Obsidian callouts - YAML, TOML and JSON frontmatter: hidden by default, shown as a key/value box with --frontmatter - Supports wikilink syntax: [[page]] and [[page|display text]] @@ -39,7 +39,7 @@ ink is a command-line tool that renders markdown files in the terminal with rich curl -fsSL https://raw.githubusercontent.com/borghei/ink/main/install.sh | sh # macOS / Linux (picks glibc or static musl build) irm https://raw.githubusercontent.com/borghei/ink/main/install.ps1 | iex # Windows PowerShell (x64 / ARM64) cargo install ink-md # from source (Rust 1.90+) -INK_VERSION=v0.9.0 sh install.sh # pin a version +INK_VERSION=v0.10.0 sh install.sh # pin a version Prebuilt: Linux amd64/arm64 (glibc 2.35+), static musl Linux amd64/arm64/armv7 (any distro), macOS amd64/arm64, Windows amd64/arm64; .deb/.rpm and tar.gz/zip archives include the man page and completions. Verify with SHA256SUMS or `gh attestation verify --repo borghei/ink`. diff --git a/install.ps1 b/install.ps1 index bba820b..f53d34b 100644 --- a/install.ps1 +++ b/install.ps1 @@ -4,7 +4,7 @@ # irm https://raw.githubusercontent.com/borghei/ink/main/install.ps1 | iex # # Environment: -# $env:INK_VERSION = "v0.9.0" install a specific release (default: latest) +# $env:INK_VERSION = "v0.10.0" install a specific release (default: latest) # $env:INK_INSTALL_DIR = "C:\tools" install somewhere else # (default: %LOCALAPPDATA%\Programs\ink) # diff --git a/install.sh b/install.sh index 549280b..c2beea7 100755 --- a/install.sh +++ b/install.sh @@ -5,7 +5,7 @@ # curl -fsSL https://raw.githubusercontent.com/borghei/ink/main/install.sh | sh # # Environment: -# INK_VERSION=v0.9.0 install a specific release (default: latest) +# INK_VERSION=v0.10.0 install a specific release (default: latest) # INK_INSTALL_DIR="$HOME/.local/bin" install somewhere else (default: /usr/local/bin) # # Options: From 05f6067469dd88b068ff8d93de9e02739212daea Mon Sep 17 00:00:00 2001 From: Amin Borghei Date: Thu, 1 Oct 2026 19:12:24 +0200 Subject: [PATCH 2/2] docs(changelog): match the review fixes --- CHANGELOG.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24ddda7..f115fed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,16 +6,16 @@ - **Mermaid diagrams are laid out, not listed.** Flowcharts used to print as a list of edges; they now draw each node once as a box, with routed edges, arrowheads, edge labels, node shapes and subgraph frames, in every direction (TD, BT, LR, RL). State, class and ER diagrams, which printed as raw source, use the same layout. Gantt charts get a scaled time axis, mindmaps draw as a tree, and unsupported diagram types show their source in a titled box. (#26) - **Interactive table of contents.** `o` moves focus into the sidebar: move with `j`/`k`, jump with Enter, fold subtrees with `h`/`l`, filter headings with `/`. A click on a row jumps to it. (#24) - **Clickable links.** With mouse capture on, clicking a link follows it; dragging still selects. (#24) -- **Open in your editor.** `e` opens the current file in `$VISUAL`/`$EDITOR` at the section you are reading and reloads it when the editor exits. (#24) +- **Open in your editor.** `e` opens the current file in `$VISUAL`/`$EDITOR` at the section you are reading and reloads it when the editor exits. On Windows, editors installed as `.cmd` shims (VS Code, Cursor) are found. (#24, #27) - **Math renders as Unicode.** `$…$`, `$$…$$` and ```` ```math ```` blocks show Greek letters, operators, fractions, roots, sub/superscripts, matrices and `cases` instead of raw LaTeX. Prices like "$5 and $10" are left alone. (#25) - **Table column alignment.** `:--`, `--:` and `:-:` are honoured. (#25) -- **More markdown.** Superscript `^x^`, spoilers `||x||`, definition lists, callouts with custom titles (`> [!NOTE] Title`, including Obsidian types), and ``/`` as real sub/superscripts. (#25) -- **Frontmatter box.** With `--frontmatter`, YAML, TOML and JSON frontmatter render as a key/value box instead of being parsed as markdown. (#25) -- **`--line-range START:END`** renders only those source lines in `--plain`, `bat`-style. (#25) +- **More markdown.** Definition lists, callouts with custom titles (`> [!NOTE] Title`, including Obsidian types), and ``/`` as real sub/superscripts for short plain text (`H2O` → H₂O). (#25, #27) +- **Frontmatter box.** With `--frontmatter`, YAML, TOML and JSON frontmatter render as a key/value box instead of being parsed as markdown. A leading JSON object is only treated as frontmatter in that mode and when markdown follows it; otherwise it is shown as written. (#25, #27) +- **`--line-range START:END`** renders only those source lines in `--plain`, `bat`-style, keeping code fences intact when a range cuts through one. (#25, #27) ### Changed - Enter follows the first followable link anywhere on screen, web and mail links included; it used to look only at the top few lines and only at local links. (#24) -- A paragraph followed by a line starting `: ` is now a definition list, ```` ```math ```` blocks render as math rather than a code box, and JSON frontmatter is stripped by default like YAML and TOML. (#25) +- A paragraph followed by a line starting `: ` is now a definition list, and ```` ```math ```` blocks render as math rather than a code box. (#25) - The table of contents highlights the heading `n`/`N` jumped to and scrolls to keep it visible. (#24) ### Fixed