Before 1.3.7 an empty line before an image could be saved as
<!-- --> on one line, which reads as raw HTML and showed
the image as text. That line is now read as the empty line plus the
image, and the next save writes them apart.
Opening a note rebuilt the wiki-link title lookup every time; it is now
built once per titles list and the list is replaced, not mutated, when a
title changes. Re-sorting the note list on each external file change
re-parsed every note's date; parsed dates are now kept per entry. A code
block naming a language without a grammar (mermaid, a typo) ran every
registered grammar on each keystroke; it is now left plain.
Text such as List<String> or <username> was read as an HTML tag and
deleted on the next save, and HTML comments were dropped. Anything in
angle brackets that is not an HTML element now stays text, and
comments are kept and shown. A numbered list that starts at 0 keeps
its numbering.
A round-trip audit of 1590 notes showed four things lost the first time a
note was edited. A code block without a language was saved as "text".
Link titles were dropped. Table column alignment was reset. Bold or
italic around inline code was removed.
All four now survive loading, editing and saving. Formatting that covers
only part of a code run is still dropped, since it cannot be written
inside a code span.
A line with thousands of unclosed [label]( starts took about 1.1 s at
56 KB, because each start read to the end of the line for its closing
parenthesis. The legacy link rule now skips starts beyond the last
closing parenthesis and bounds the failed searches per block.
The image toolbar stayed open after an undo and its buttons then changed
a different image. It now closes when its image is no longer at the
remembered position.
Images now keep their CommonMark title as hover text through load, edit and
save: ``. Link titles are still dropped, as
before.
Parsing:
- helix_images no longer strips `title` from images (links unchanged).
- An image whose destination and title are valid CommonMark now uses
markdown-it's own image rule instead of the legacy-link rule. Previously
any space before a title sent the image down the legacy path, which can't
handle escaped quotes (`"Say \"hi\""`) or `(title)` titles and mangled
them into the URL.
- Genuinely legacy forms (spaces in the path, `%20"title"`) still go through
the legacy rule, which now also keeps the image's title.
Saving: `serializeImageTitle()` writes ` "title"` with CommonMark backslash
escapes (`\"`, `\\`, and `\&` only before entity-like text). The parser
undoes these exactly, so titles survive any number of saves unchanged.
UI: a "T" button on the image toolbar opens a small dialog to set or clear
the hover text.
Tests: tests/image-titles.test.mjs covers exact round trips for tricky titles
(parentheses, &, entities, quotes, backslashes, markup), no growth over
repeated saves, the written form, titles from other apps, legacy
destinations, and links still dropping titles. The upstream assertion that
images render without `title=` is updated to the new contract.
Strip a legacy link title with a single scan instead of a regular
expression that is quadratic on a long run of spaces. Widen the done
checkbox's tap area on phones without changing its look, and say "1
unchanged line" in Version History when only one line is folded.
Write a literal $ as typed unless plain dollars could create, remove or
re-pair an inline formula. Save portable image paths when a centered,
aligned or styled block is written. Percent-encode a newly stored
attachment's path before it is inserted, and keep a Windows drive letter
literal in paths outside the vault. Keep whitespace-only code spans in
simple list items, task items and table cells.
Compare Version History in bounded time with a synchronous line diff and
an edit limit. Beyond the limit, shared lines at the start and end stay
unchanged and the rest is shown as removed and added.
Render the first soft break of a callout's opening paragraph as a newline
so the title and body split correctly again. Only turn [ ] and [x] markers
into task items in bullet lists, not numbered ones. Join serialized blocks
in markdown.ts so an empty paragraph before an image is written as a blank
line, and lists no longer gain an extra blank line, without collapsing blank
lines inside code blocks.
In Version History, compare the current note and snapshots after ignoring
leading and trailing blank lines, so unchanged last lines and a blank line
after the frontmatter no longer show as changes.