Um...changes. I don’t even remember *blush*
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
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