highlightjs/highlight.js

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

已關閉

#3,817 建立於 2023年7月10日

 (3 則留言) (0 個反應) (0 位負責人)JavaScript (3,497 個分叉)batch import
buggood first issuehelp welcomelanguage

倉庫指標

星標
 (22,960 顆星)
PR 合併指標
 (平均合併 6分鐘) (30 天內合併 2 個 PR)

描述

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.

貢獻者指南