Commit 0997089e9d341b1ce52e3ba6ebe866630a96adb5

Lea Verou 2014-04-02T08:40:10

Merge pull request #232 from adamzap/gh-pages Add `this` as a keyword in JavaScript

1
2
3
4
5
6
7
8
9
10
11
diff --git a/components/prism-javascript.js b/components/prism-javascript.js
index 17df0d1..ea0388b 100644
--- a/components/prism-javascript.js
+++ b/components/prism-javascript.js
@@ -1,5 +1,5 @@
 Prism.languages.javascript = Prism.languages.extend('clike', {
-	'keyword': /\b(var|let|if|else|while|do|for|return|in|instanceof|function|get|set|new|with|typeof|try|throw|catch|finally|null|break|continue)\b/g,
+	'keyword': /\b(var|let|if|else|while|do|for|return|in|instanceof|function|get|set|new|with|typeof|try|throw|catch|finally|null|break|continue|this)\b/g,
 	'number': /\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?|NaN|-?Infinity)\b/g
 });