Commit b41fb8f11d912056b04455c722ce2d40bc3630a1

Michael Schmidt 2018-10-22T15:47:13

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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/examples/prism-javascript.html b/examples/prism-javascript.html
index 9b94468..51fe483 100644
--- a/examples/prism-javascript.html
+++ b/examples/prism-javascript.html
@@ -49,7 +49,7 @@ var foo = /a/, bar = 3/4;</code></pre>
 
 <h2>ES6 features</h2>
 <pre><code>// Regex "y" and "u" flags
-/[a-zA-Z]+/gimyu
+var a = /[a-zA-Z]+/gimyu;
 
 // for..of loops
 for(let x of y) { }
@@ -74,4 +74,4 @@ multiple lines.`
 
 <h3>String interpolation containing a closing brace</h3>
 <pre><code>`${ {foo:'bar'}.foo }`
-`${ '}' }`</code></pre>
\ No newline at end of file
+`${ '}' }`</code></pre>