Repository navigation
fix: ten pre-release review findings for 0.9.0 - #21
Merged
Merged
Conversation
Anchors were slugged from the TOC display text, which drops inline code and carries smart-punctuation dashes, so [x](#install-ink-cli) or a heading made only of code could not be reached. Layout now records each heading's anchor text (inline code, :shortcode:, -- as written) next to the display text, and #fragment links match against that.
The background query gave up after 100 ms (400 ms over SSH), so on slow links not flagged as SSH the reply arrived later and was echoed at the prompt or read as keys. The wait is now 1 s for every terminal (the DA1 answer still ends it at once on a normal terminal), a partial reply at the deadline gets one 500 ms extension, and the reader drops an OSC 11 reply already queued as input when the query got nothing at all. The query is also no longer sent when its answer is unused: --list-themes, non-rendering subcommands, and colour turned off.
With --color=never or NO_COLOR the filled and remaining parts of the bar were the same glyph in the same default colour, so it always read 100%. When the two colours cannot be told apart and the glyphs are the same, the remainder is now drawn blank.
The 8192 px per-side limit refused real images that rendered in v0.8.0. The side limit is now 65535 (it only rejects nonsense headers); the 256 MB allocation cap, checked against the declared output size before any pixel exists, is what bounds a decompression bomb. A grey 11000x11000 bomb now decodes once and is cached at 2048 px a side; the same image as RGBA (~484 MB) is still refused.
…ws PATH The PowerShell fallback was looked up on PATH, but it exists for appendWindowsPath=false, where neither clip.exe nor powershell.exe is on PATH. On WSL ink now also probes the C: drive mount (/mnt/c, or /c with automount root=/) for clip.exe, then for powershell.exe.
In ASCII mode every leading # was skipped as decoration, so in a code box a line like '| # install deps' or '| #include' put the visual-mode cursor past the #, and a yank from line start dropped it. A # run now counts only as the line's first mark and when a space follows it.
Links were split at the first # before resolving, so [notes](c#-notes.md) or [x](issue#12.md), followed in v0.8.0, silently did nothing. The whole link is now tried as a file name first (%23 decoded), then split at the last #, then the first. [[page#Section]] resolves to page.md with the heading text as fragment (matched by slug, as in Obsidian), and [[#Section]] jumps within the document. A link that cannot be followed now flashes a message instead of doing nothing.
The deep-nesting guard counted every * _ ~ [ on a line, inside fenced code and tables too, so one long minified line or a wide table row of links turned every [^1] into literal text. Footnotes are now disabled only when the measured AST depth (from a probe parse without footnotes, which comrak runs iteratively) exceeds 1200; comrak's recursive footnote pass overflows a 1 MB debug stack at about 1940. The probe runs only when the document uses [^ and has enough nesting-capable characters to reach the limit.
Every NavEntry held its own copy of the tab source, pushed for each in-page anchor jump and cloned again on every back/forward; history was unbounded, so a 5 MB document and 200 jumps held about 1 GB. The source is now an Arc<str> shared by the tab and its entries, history keeps the last 256 places, and going back to a local file that changed on disk since re-reads it, as v0.8.0 did (stdin and URL documents still use the snapshot).
…breaks A cell ending in <br> was drawn one line taller with an empty last line, and <br><br> left a blank line inside the cell. Breaks in a cell now only separate content: leading, trailing and repeated ones are dropped, as a trailing break in a paragraph already is.
Merged
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the ten findings from the high-effort code review of
v0.8.0..main, one commit and one regression test each.clip.exeand PowerShell by absolute path when the Windows PATH is not appended.#is treated as decoration only for headings, not in code lines.#in the name work again;[[page#section]]and[[#section]]wikilinks jump to the heading. A link that cannot be followed shows a message.<br>in a table cell no longer adds blank lines.Testing
fmt, clippy and the full suite pass locally (357 tests), including the pty suite. Snapshots unchanged. The Windows build of these changes is verified by this PR's CI only.
🤖 Generated with Claude Code
https://claude.ai/code/session_01UVcvmQrSXd2eyt32g4ko19