You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error is caused by \b. The first \b has been there from the beginning. Then I added the last \b. Both of them are erroneous, because \b uses [0-9A-Z_a-z] (see ECMA-262, sections 21.2.1, 21.2.2.12, 21.2.2.6.1), whereas directive names consist of [-0-9A-Za-z] (see CSP 1.0, CSP 1.1, CSP2, and CSP3).
Information
Does the problem still occur in the latest version of Prism?
Yes.
Description
Directive names with adjacent hyphens are highlighted. For example, Prism highlights
default-src
inside the following sequences:The error is caused by
\b
. The first\b
has been there from the beginning. Then I added the last\b
. Both of them are erroneous, because\b
uses[0-9A-Z_a-z]
(see ECMA-262, sections 21.2.1, 21.2.2.12, 21.2.2.6.1), whereas directive names consist of[-0-9A-Za-z]
(see CSP 1.0, CSP 1.1, CSP2, and CSP3).Code snippet
The code being highlighted incorrectly.
The
default-src
part should not be highlighted.The text was updated successfully, but these errors were encountered: