Skip to content

v7.23.2

Latest

Choose a tag to compare

@metonym metonym released this 15 Nov 11:49
v7.23.2
400a362

Fixes

  • keep styling on colon-separated SGR sequences in parseAnsi and AnsiOutput (ca29107)
  • keep the style tag literal out of HighlightEditable (cd7cf72)

Colon SGR sequences

parseAnsi treated colon sub-parameter sequences like ESC[4:3m (curly underline) and ESC[38:5:196m as a full reset, so text after them lost its color and weight. These are emitted by delta, Neovim, and rustc/cargo. Underline styles (4:0..4:5), 256-color (38:5:n, 48:5:n), and truecolor (38:2:[cs]:r:g:b) are now parsed, and unsupported groups like 58:5:n are ignored without touching the active style. Fixes #606.

parseAnsi("\x1b[1mbold \x1b[38:5:196mred");
// 7.23.1: [{ text: "bold ", bold: true }, { text: "red" }]
// 7.23.2: [..., { text: "red", bold: true, fg: { index: 196 } }]

HighlightEditable with svelte-preprocess

svelte-preprocess finds <style> blocks with a regex, so the <style> template string inside HighlightEditable's script was mistaken for the component's styles, which broke rollup and webpack builds that use it. The wrapping now lives in highlight-theme.js.