highlightjs/highlight.js

(Rust) Escaped double quotations in string at attribute are not highlighted properly

Open

#3 817 ouverte le 10 juil. 2023

Voir sur GitHub
 (3 commentaires) (0 réactions) (0 assignés)JavaScript (3 497 forks)batch import
buggood first issuehelp welcomelanguage

Métriques du dépôt

Stars
 (22 960 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Describe the issue

Escaped double quotations in string at attributes are not treated as a escaped character but a normal quotation.

Which language seems to have the issue?

Rust

Sample Code to Reproduce

#[derive(ThisError)]
enum MyError {
  #[error("\" appears in a string")]
  UnexpectedDoubleQuote
}

fn main() {}

sample at jsfiddle

image

Expected behavior

The escaped double quotation \" shouldn't be treated as a normal double quotation.

Guide contributeur