diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fee13e..5cf82fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 0.12.0 — 2026-10-23 + +### Added +- **`width = "full"` in the config file.** The config file's `width` takes the same keywords as `--width` (`narrow`, `wide`, `full`) as well as a column count. Before, only a number worked. + +### Changed +- **Wide terminals use the width you ask for.** In the reader, `-w full` and column counts above 120 were still held to 120 columns. Now `-w N` is honoured up to the width of the document pane, and `-w full` fills the pane with a 2-column margin. With no width set, text still stops at 120 columns, and `--plain` output is unchanged. A config `width` above 120 widens the reader too. Thanks to @narma. (#34) +- **Richer code highlighting in the `terminal` theme.** Only a function's name is coloured now, not the whole call. Parameters, shell flags, JSON and YAML keys, CSS colours and values, Rust macros and diff headers get their own palette colours. Thanks to @feraxhp. (#33) +- **Library API: `Args.width` is now `ink_md::Width`** (`Auto`, `Columns(n)` or `Full`) instead of `Option`, and `Args` implements `Default`. Build it with `Args { width: Width::Columns(80), ..Default::default() }` so fields added later don't break your code. (#37) + +### Fixed +- **Links and inline styles work inside table cells.** Cells were flattened to plain text, so a link in a table (like the docs table in ink's own README) wasn't clickable, the `f` link hints skipped it, and bold, italic, strikethrough and inline code lost their styling. Cells now render inline markup as paragraphs do: links are clickable, show up in `f` and keep their target when wrapped. Emoji shortcodes, footnote references, inline images and inline HTML in a cell render too, instead of being dropped. Cells without markup look the same as before. (#35) +- **The table of contents stays as you left it when you follow a link.** Following a link, or going back and forward, reopened a sidebar you had closed (or closed one you had opened) and laid the text out for the wrong width. (#38) + ## 0.11.2 — 2026-10-23 ### Security diff --git a/Cargo.lock b/Cargo.lock index 3f04f42..58e8393 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1520,7 +1520,7 @@ dependencies = [ [[package]] name = "ink-md" -version = "0.11.2" +version = "0.12.0" dependencies = [ "anyhow", "assert_cmd", diff --git a/Cargo.toml b/Cargo.toml index e1fbd48..a5dfd73 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ink-md" -version = "0.11.2" +version = "0.12.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 7a61d65..643049c 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,7 @@ Thanks to everyone who has sent a pull request: - [@mariusrueve](https://github.com/mariusrueve) for the Conda and Pixi instructions ([#9](https://github.com/borghei/ink/pull/9)) and the [conda-forge package](https://github.com/conda-forge/ink-md-feedstock) behind them - [@narma](https://github.com/narma) for honouring `--width full` and wide column counts in the reader ([#34](https://github.com/borghei/ink/pull/34)) +- [@feraxhp](https://github.com/feraxhp) for richer code highlighting in the terminal theme ([#33](https://github.com/borghei/ink/pull/33)) ## License diff --git a/docs/features.md b/docs/features.md index ca0ea01..466615e 100644 --- a/docs/features.md +++ b/docs/features.md @@ -42,7 +42,7 @@ Headings, emphasis, strikethrough, links, blockquotes, nested lists, task lists, A few details worth knowing: -- **Tables** follow their column alignment (`:--`, `:-:`, `--:`), with wide CJK and emoji cells measured correctly. +- **Tables** follow their column alignment (`:--`, `:-:`, `--:`), with wide CJK and emoji cells measured correctly. Links, bold, italic and code work inside cells, and table links are clickable and show up in `f`. - **`` and ``** become real superscript and subscript when every character has a Unicode form: `x2` is `x²` and `H2O` is `H₂O`. With `--ascii` they read `x^(2)` and `H_(2)O`. Anything else is shown as written. - **Strikethrough** works with one or two tildes, as on GitHub. Carets and double bars in prose (`2^10`, `a||b`) stay as typed, since `^x^` and `||x||` aren't GitHub markdown. - **Definition lists** (`Term`, then `: definition`) get a bold term with the definitions indented underneath. diff --git a/docs/index.html b/docs/index.html index 6d78242..5bb7527 100644 --- a/docs/index.html +++ b/docs/index.html @@ -25,7 +25,7 @@ "@context": "https://schema.org", "@type": "SoftwareApplication", "name": "ink", - "softwareVersion": "0.11.2", + "softwareVersion": "0.12.0", "description": "A terminal markdown reader. Renders markdown with syntax highlighting, inline images, mermaid diagrams, math, themes, tabs, search, a table of contents, presentation mode and a bat-style pager. Sanitizes untrusted files and blocks remote image fetches by default. A single Rust binary with no runtime dependencies.", "applicationCategory": "DeveloperApplication", "operatingSystem": "macOS, Linux, Windows", @@ -685,7 +685,7 @@
  • Features
  • Docs
  • Changelog
  • -
  • GitHub v0.11.2
  • +
  • GitHub v0.12.0
  • @@ -696,7 +696,7 @@

    - New in 0.11: the terminal theme + New in 0.12: links in tables, full-width reading macOS · Linux · Windows

    Markdown, properly typeset in your terminal.

    diff --git a/docs/install.md b/docs/install.md index 3cd1845..1e43697 100644 --- a/docs/install.md +++ b/docs/install.md @@ -26,11 +26,11 @@ Two environment variables change what it does: | Variable | Effect | |---|---| -| `INK_VERSION` | Install a specific release, e.g. `v0.11.2`. Default: latest. | +| `INK_VERSION` | Install a specific release, e.g. `v0.12.0`. Default: latest. | | `INK_INSTALL_DIR` | Install somewhere else, e.g. `$HOME/.local/bin`. | ```bash -curl -fsSL https://raw.githubusercontent.com/borghei/ink/main/install.sh | INK_VERSION=v0.11.2 INK_INSTALL_DIR="$HOME/.local/bin" sh +curl -fsSL https://raw.githubusercontent.com/borghei/ink/main/install.sh | INK_VERSION=v0.12.0 INK_INSTALL_DIR="$HOME/.local/bin" sh ``` ## Install script (Windows) @@ -39,7 +39,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 ``` -This installs `ink.exe` (x64 or ARM64) to `%LOCALAPPDATA%\Programs\ink` and adds it to your user `PATH`. Set `$env:INK_VERSION = "v0.11.2"` first to pin a version. +This installs `ink.exe` (x64 or ARM64) to `%LOCALAPPDATA%\Programs\ink` and adds it to your user `PATH`. Set `$env:INK_VERSION = "v0.12.0"` first to pin a version. ## Homebrew diff --git a/docs/llms-full.txt b/docs/llms-full.txt index fd8c941..320cb2e 100644 --- a/docs/llms-full.txt +++ b/docs/llms-full.txt @@ -12,7 +12,7 @@ ink is a feature-rich terminal markdown reader built in Rust. It renders markdow - Bold, italic, strikethrough, inline code - Links with OSC 8 hyperlink support (Cmd+Click / Ctrl+Click in supported terminals) - Syntax-highlighted code blocks using syntect (supports all major programming languages) -- Tables with auto-sized columns, word wrapping and column alignment (:--, :-:, --:) +- Tables with auto-sized columns, word wrapping and column alignment (:--, :-:, --:); links, bold, italic and code inside cells - Blockquotes with nested support and depth-based coloring - Ordered and unordered lists with nesting - Task lists with checkbox rendering @@ -164,6 +164,6 @@ preset = "emacs" # default | vim | emacs - Website: https://borghei.github.io/ink/ - Author: Amin Borghei - Crates.io: https://crates.io/crates/ink-md (install with `cargo install ink-md`, Rust 1.90+) -- Install script (macOS/Linux): `curl -fsSL https://raw.githubusercontent.com/borghei/ink/main/install.sh | sh` (picks the glibc or static musl build; pin with INK_VERSION=v0.11.2, target dir INK_INSTALL_DIR) +- Install script (macOS/Linux): `curl -fsSL https://raw.githubusercontent.com/borghei/ink/main/install.sh | sh` (picks the glibc or static musl build; pin with INK_VERSION=v0.12.0, target dir INK_INSTALL_DIR) - Install script (Windows): `irm https://raw.githubusercontent.com/borghei/ink/main/install.ps1 | iex` (x64/ARM64, installs to %LOCALAPPDATA%\Programs\ink) - Prebuilt binaries: Linux amd64/arm64 (glibc 2.35+), static musl Linux amd64/arm64/armv7 (Alpine, older glibc, Raspberry Pi), macOS amd64/arm64, Windows amd64/arm64; .deb/.rpm and tar.gz/zip archives with man page and completions diff --git a/docs/llms.txt b/docs/llms.txt index 3d609dc..8f738bc 100644 --- a/docs/llms.txt +++ b/docs/llms.txt @@ -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.11.2 sh install.sh # pin a version +INK_VERSION=v0.12.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 dbf2475..d111881 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.11.2" install a specific release (default: latest) +# $env:INK_VERSION = "v0.12.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 e1964c7..3113103 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.11.2 install a specific release (default: latest) +# INK_VERSION=v0.12.0 install a specific release (default: latest) # INK_INSTALL_DIR="$HOME/.local/bin" install somewhere else (default: /usr/local/bin) # # Options: