Skip to content

v1.6.0

Choose a tag to compare

@JanEickholt JanEickholt released this 06 Sep 07:15
· 18 commits to master since this release
v1.6.0
394c0f8

Svelte files get real syntax highlighting

svelte files now highlight with a dedicated svelte grammar on top of the vendored highlight.js lib/common set — markup, {#if} blocks and inline expressions each get their own token classes, so word-diff chips land on the changed fragment instead of the whole tag soup. The vendored language set ships with the plugin; no host-side highlight.js dependency needed.

Word chips diff whole changed blocks

Chips used to be computed per modified row pair, so a one-line removal replaced by a multi-line block chipped its surviving prefix against whichever sibling line it paired with, while genuinely novel lines rendered with no emphasis at all. Changed blocks now diff as one token stream:

  • tokens surviving anywhere in the run stay chip-free on both sides
  • wholly-novel lines keep the row tint instead of a full-line chip
  • one-sided rows apply the same run-level segments
  • whitespace never chips (no full-width indent bars)

Pairing fixes

  • Folded statements (an attribute list collapsed into one line, e.g. a one-line <a href=…>…</a>) anchor at the block head, so their counterparts stop pairing with a stray closing tag lower down.
  • Blank changed lines tint green/red like any other changed row; the faint ⏎ marker is gone.

Autoscroll survives big streaming edits

The row height-sync cleared every pair's min-height before remeasuring, and the forced layout in between saw the card collapsed. A conversation scroller pinned to the bottom clamped its scroll position into that collapsed layout and never recovered — on bigger edits each streaming tick stranded the bottom hundreds of pixels out of view until follow-scroll latched off. The sync now holds the card's current height across the measure, so the clamp never fires.