zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
25.24k stars 1.18k forks source link

Rust: `'\"'` highlight is broken #3522

Closed 4yman-0 closed 3 weeks ago

4yman-0 commented 3 weeks ago

Description of the problem or steps to reproduce

micro thinks '\"' is " and highlights all lines after it with the same color (yellow by default).

copy and paste this code to something.rs:

'\"'

Now micro will break.
here are some keywords (should be red):

if
else
match
return

Specifications

Version: 2.0.11 Commit hash: unknown OS: Debian 12 Terminal: mate-terminal

dmaluka commented 3 weeks ago

I can reproduce this issue with 2.0.11, but cannot reproduce it with 2.0.12 newer.

It was fixed by #2810.

4yman-0 commented 3 weeks ago

Too bad I'm on Debian.

Thank you for reproducing the bug.

JoeKar commented 3 weeks ago

Unfortunately Debian 12 aka bookworm only offers v2.0.11 via the official repositories. From trixie (testing) your will receive 2.0.14. So I recommend to use our binary releases of v2.0.14 to place it everywhere you want and include the location into your PATH environment. :wink: