Skip to content

Commit b41fb8f

Browse files
RunDevelopmentmAAdhaTTah
authored andcommitted
Fixes regex for JS examples (#1591)
This PR fixes a regex example which Prism does not highlight correctly because it is preceded by a comment.
1 parent 0d73f7f commit b41fb8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/prism-javascript.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h2>A division operator on the same line as a regex</h2>
4949

5050
<h2>ES6 features</h2>
5151
<pre><code>// Regex "y" and "u" flags
52-
/[a-zA-Z]+/gimyu
52+
var a = /[a-zA-Z]+/gimyu;
5353

5454
// for..of loops
5555
for(let x of y) { }
@@ -74,4 +74,4 @@ <h2>Known failures</h2>
7474

7575
<h3>String interpolation containing a closing brace</h3>
7676
<pre><code>`${ {foo:'bar'}.foo }`
77-
`${ '}' }`</code></pre>
77+
`${ '}' }`</code></pre>

0 commit comments

Comments
 (0)