typst / webapp-issues

Issue tracker for Typst's web app.
https://typst.app
13 stars 0 forks source link

YAML highlighting with chomping #428

Open EpicEricEE opened 2 months ago

EpicEricEE commented 2 months ago

Description

Only a very minor thing, but when using block chomping indicators (e.g. >- or |-) to trim trailing line breaks from multiline strings, the syntax highlighter fails to highlight the string correctly:

With chomping Without chomping
image image

Reproduction URL

No response

Browsers

Chrome

OS

Windows

laurmaedje commented 1 month ago

Can reproduce this on CodeMirror Try.

This is with @codemirror/legacy-modes/mode/yaml. I don't remember why we use the legacy mode, but the non-legacy mode doesn't highlight either string, instead coloring > and >- in red.