10 Commits
Author SHA1 Message Date
Yuri Karamian 4e2c87434d fix: show images glued to the empty-line marker by older versions
Before 1.3.7 an empty line before an image could be saved as
<!-- -->![](image.png) 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.
2026-10-14 08:53:58 +02:00
Yuri Karamian c0058f43f4 perf: reuse the wiki title index, parsed note dates and skip grammar guessing
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.
2026-10-13 14:19:27 +02:00
Yuri Karamian 1289e865ce fix: keep angle-bracket text and comments when a note is saved
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.
2026-10-11 09:43:24 +02:00
Yuri Karamian f0bf0ac5e3 fix: keep bare code fences, link titles, table alignment and formatted inline code
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.
2026-10-10 10:19:04 +02:00
Yuri Karamian 0ecacbe1dd fix: parse lines with many unclosed links in linear time, and close a stale image toolbar
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.
2026-10-09 23:28:46 +02:00
Shawn Olson 0b94d9ff32 feat: keep image hover titles ("title") and let users edit them
Images now keep their CommonMark title as hover text through load, edit and
save: `![alt](image.png "Hover text")`. 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.
2026-10-09 09:12:11 -07:00
Yuri Karamian 076234974a fix: parse long link destinations in linear time, and polish small mobile and history details
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.
2026-10-08 01:04:18 +02:00
Yuri Karamian ea4a5eae26 fix: keep dollar signs, aligned images, attachment names and code spaces intact
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.
2026-10-07 22:25:16 +02:00
Yuri Karamian 8d3338ef89 fix: keep callouts, numbered lists, images and blank lines intact on save
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.
2026-10-07 22:12:20 +02:00
Yuri Karamian f07241dd3a fix: harden note saves, attachment imports, and Markdown handling
- Fix new-note save conflicts and scoped external Markdown access
- Preserve attachment URIs and links across saves, imports, and moves
- Ignore unused and overridden attachment reference definitions
- Improve Markdown parsing, outline handling, and editor performance
- Optimize graph, task filtering, tags, WebDAV, and Obsidian imports
- Fix note-list metadata wrapping and add regression coverage
- Document saving and close-to-tray behavior
2026-10-06 06:09:14 +02:00