highlight.js icon indicating copy to clipboard operation
highlight.js copied to clipboard

(Rust) Mismatched brackets in complex attribute

Open notriddle opened this issue 1 year ago • 4 comments

Describe the issue On an attribute with nested brackets, the ending brackets aren't highlighted the same as the starting brackets.

Which language seems to have the issue? Rust

Are you using highlight or highlightAuto? Discourse seems to use highlight.

Sample Code to Reproduce image

Expected behavior

#[derive(Parser)]
pub struct Arg {
  #[arg(short, long, default_values_t = [66,77])] // here, the brackets (don't) seem mismatched.
  pub(crate) arg1: Vec<u32>
}

GitHub highlights this correctly, but highlight.js doesn't.

Additional context

https://users.rust-lang.org/t/a-display-error-of-the-forum/109255

https://meta.discourse.org/t/bad-rust-syntax-highlighting/302236

notriddle avatar Apr 03 '24 15:04 notriddle

/assign

ryzen-xp avatar Oct 21 '24 16:10 ryzen-xp

hello @notriddle , Please assign me this issue .

ryzen-xp avatar Oct 21 '24 16:10 ryzen-xp

I can't. Not a project member.

notriddle avatar Oct 21 '24 16:10 notriddle

@ryzen-xp If you wanted to submit that PR here we could work on cleaning it up a a bit and getting it merged into main.

joshgoebel avatar Oct 23 '24 01:10 joshgoebel