Commit 5c7827d0e9afa9e836c57fb25fa8415fb7b8d299

Lea Verou 2012-11-09T16:32:33

Um...changes. I don’t even remember *blush*

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ebd9fb4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+hide-*.js
\ No newline at end of file
diff --git a/code.js b/code.js
index 627a828..004fb16 100644
--- a/code.js
+++ b/code.js
@@ -21,12 +21,20 @@ var components = {
 	},
 	languages: {
 		meta: {
-			path: 'components/prism-{id}',
+			path: 'components/prism-{id}'
+		},
+		'markup': {
+			title: 'Markup',
+			option: 'default'
+		},
+		'css': {
+			title: 'CSS',
+			option: 'default'
+		},
+		'javascript': {
+			title: 'JavaScript',
 			option: 'default'
 		},
-		'markup': 'Markup',
-		'css': 'CSS',
-		'javascript': 'JavaScript',
 		'java' : 'Java',
 	},
 	plugins: {
diff --git a/download.js b/download.js
index 5b93ecc..e6e3ce8 100644
--- a/download.js
+++ b/download.js
@@ -236,7 +236,7 @@ function generateCode(){
 					if (cache[path]) {
 						var type = path.match(/\.(\w+)$/)[1];
 						
-						code[type] += cache[path].contents + '\n';
+						code[type] += cache[path].contents + (type === 'js'? ';' : '') + '\n';
 					}
 				});
 			}
diff --git a/prism.js b/prism.js
index 6b2162a..e2676d5 100644
--- a/prism.js
+++ b/prism.js
@@ -365,7 +365,7 @@ Prism.hooks.add('wrap', function(env) {
 
 Prism.languages.css = {
 	'comment': /\/\*[\w\W]*?\*\//g,
-	'atrule': /@[\w-]+?(\s+.+)?(?=\s*{|\s*;)/gi,
+	'atrule': /@[\w-]+?(\s+[^;{]+)?(?=\s*{|\s*;)/gi,
 	'url': /url\((["']?).*?\1\)/gi,
 	'selector': /[^\{\}\s][^\{\}]*(?=\s*\{)/g,
 	'property': /(\b|\B)[a-z-]+(?=\s*:)/ig,
@@ -406,8 +406,8 @@ Prism.languages.javascript = {
 	},
 	'keyword': /\b(var|let|if|else|while|do|for|return|in|instanceof|function|new|with|typeof|try|catch|finally|null|break|continue)\b/g,
 	'boolean': /\b(true|false)\b/g,
-	'number': /\b(-?(Infinity|(0[xX][0-9a-fA-F]+)|(\d*\.?\d+([eE]\+?\d+)?))|NaN)\b/g,
-	'operator': /[-+]{1,2}|!|=?<|=?>|={1,2}|(&){1,2}|\|?\||\?|\*|\/|%|~|\^|:/g,
+	'number': /\b-?(0x)?\d*\.?\d+\b/g,
+	'operator': /[-+]{1,2}|!|=?<|=?>|={1,2}|(&){1,2}|\|?\||\?|\*|\//g,
 	'ignore': /&(lt|gt|amp);/gi,
 	'punctuation': /[{}[\];(),.:]/g
 };
@@ -425,22 +425,4 @@ if (Prism.languages.markup) {
 			}
 		}
 	});
-}
-
-/*********************************************** 
-     Begin prism-java.js 
-***********************************************/ 
-
-Prism.languages.java = {
-	'comment': {
-		pattern: /(^|[^\\])(\/\*[\w\W]*?\*\/|\/\/.*?(\r?\n|$))/g,
-		lookbehind: true
-	},
-	'string': /("|')(\\?.)*?\1/g,
-	'keyword': /\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/g,
-	'boolean': /\b(true|false)\b/g,
-	'number': /\b-?(0x)?\d*\.?\d+\b/g,
-	'operator': /[-+]{1,2}|!|=?<|=?>|={1,2}|(&){1,2}|\|?\||\?|\*|\/|%|\^|(<){2}|($gt;){2,3}|:|~/g,
-	'ignore': /&(lt|gt|amp);/gi,
-	'punctuation': /[{}[\];(),.:]/g,
-};
+}
\ No newline at end of file