Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting bug - inside attributes, using macros and then brackets in strings breaks the highlighting #511

Open
NeoGalaxy opened this issue Jun 5, 2023 · 0 comments
Labels
A-syntax Area: Syntax highlighting

Comments

@NeoGalaxy
Copy link

NeoGalaxy commented Jun 5, 2023

Sublime Text Version

Sublime Text 4 (Build 4143)

Rust Enhanced Version

v2.25

Operating system

A good example is:
Os Name: Ubuntu 20.04.6 LTS
Gnome Version: 3.36.8

Expected behavior

In item attributes, syntax highlighting highlights strings correctly.

Actual behavior

In item attributes, if there's a macro call and then a string containing brackets, the string isn't highlighted as such and the rest of the code is highlighted as a string. Removing the macro call resolves everything and removing the brackets makes the rest of the code highlight normally (except the string in the attribute, which is not a big deal for me)

Steps to reproduce

Write the following function in your code, and look it in sublime text:

#[ensures(matches!(ret, None), "[]")]
pub fn foo(&mut self) -> Result<u32, u32> {
    todo!()
}

This occurred while using the crate contracts.

@ehuss ehuss added the A-syntax Area: Syntax highlighting label Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-syntax Area: Syntax highlighting
Projects
None yet
Development

No branches or pull requests

2 participants