Skip to content

Commit

Permalink
Run gulp and update tests after #801 merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Oct 10, 2015
1 parent ad316a3 commit e135947
Show file tree
Hide file tree
Showing 15 changed files with 89 additions and 26 deletions.
2 changes: 1 addition & 1 deletion components/prism-c.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/prism-csharp.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/prism-fsharp.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/prism-javascript.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion components/prism-jsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Prism.languages.insertBefore('inside', 'attr-value',{
inside: {
'function' : Prism.languages.javascript.function,
'punctuation': /[={}[\];(),.:]/,
'keyword': Prism.languages.javascript.keyword
'keyword': Prism.languages.javascript.keyword,
'boolean': Prism.languages.javascript.boolean
},
'alias': 'language-javascript'
}
Expand Down
2 changes: 1 addition & 1 deletion components/prism-jsx.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion prism.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ Prism.languages.clike = {
********************************************** */

Prism.languages.javascript = Prism.languages.extend('clike', {
'keyword': /\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/,
'keyword': /\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,
'number': /\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,
// Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
'function': /[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i
Expand Down
2 changes: 1 addition & 1 deletion tests/languages/bison/c_feature.test
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exp:
["bison", [
["c", [
["delimiter", "%{"],
["macro", ["#include ", ["string", "<stdio.h>"]]],
["macro", ["#", ["directive", "include"], ["string", "<stdio.h>"]]],
["delimiter", "%}"]
]],
["keyword", "%code"],
Expand Down
34 changes: 29 additions & 5 deletions tests/languages/c/macro_feature.test
Original file line number Diff line number Diff line change
@@ -1,17 +1,41 @@
# include <stdio.h>
#define PG_locked 0
#foo \
bar

#elif
#else
#endif
#error
#ifdef
#ifndef
#if
#import
#include
#line
#pragma
#undef
#using

----------------------------------------------------

[
["macro", [
"# include ",
"# ", ["directive", "include"],
["string", "<stdio.h>"]
]],
["macro", ["#define PG_locked 0"]],
["macro", ["#foo \\\r\nbar"]]
["macro", ["#", ["directive", "define"], " PG_locked 0"]],
["macro", ["#", ["directive", "elif"]]],
["macro", ["#", ["directive", "else"]]],
["macro", ["#", ["directive", "endif"]]],
["macro", ["#", ["directive", "error"]]],
["macro", ["#", ["directive", "ifdef"]]],
["macro", ["#", ["directive", "ifndef"]]],
["macro", ["#", ["directive", "if"]]],
["macro", ["#", ["directive", "import"]]],
["macro", ["#", ["directive", "include"]]],
["macro", ["#", ["directive", "line"]]],
["macro", ["#", ["directive", "pragma"]]],
["macro", ["#", ["directive", "undef"]]],
["macro", ["#", ["directive", "using"]]]
]

----------------------------------------------------
Expand Down
26 changes: 23 additions & 3 deletions tests/languages/csharp/preprocessor_feature.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,32 @@
#if DEBUG
#endif

#elif
#else
#endregion
#error
#line
#pragma
#region
#undef
#warning

----------------------------------------------------

[
["preprocessor", "#define DEBUG"],
["preprocessor", "#if DEBUG"],
["preprocessor", "#endif"]
["preprocessor", ["#", ["directive", "define"], " DEBUG"]],
["preprocessor", ["#", ["directive", "if"], " DEBUG"]],
["preprocessor", ["#", ["directive", "endif"]]],

["preprocessor", ["#", ["directive", "elif"]]],
["preprocessor", ["#", ["directive", "else"]]],
["preprocessor", ["#", ["directive", "endregion"]]],
["preprocessor", ["#", ["directive", "error"]]],
["preprocessor", ["#", ["directive", "line"]]],
["preprocessor", ["#", ["directive", "pragma"]]],
["preprocessor", ["#", ["directive", "region"]]],
["preprocessor", ["#", ["directive", "undef"]]],
["preprocessor", ["#", ["directive", "warning"]]]
]

----------------------------------------------------
Expand Down
13 changes: 10 additions & 3 deletions tests/languages/fsharp/preprocessor_feature.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@
#else
#endif

#light
#line
#nowarn

----------------------------------------------------

[
["preprocessor", "#if foo"],
["preprocessor", "#else"],
["preprocessor", "#endif"]
["preprocessor", ["#", ["directive", "if"], " foo"]],
["preprocessor", ["#", ["directive", "else"]]],
["preprocessor", ["#", ["directive", "endif"]]],
["preprocessor", ["#", ["directive", "light"]]],
["preprocessor", ["#", ["directive", "line"]]],
["preprocessor", ["#", ["directive", "nowarn"]]]
]

----------------------------------------------------
Expand Down
13 changes: 13 additions & 0 deletions tests/languages/javascript/boolean_feature.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
true
false

----------------------------------------------------

[
["boolean", "true"],
["boolean", "false"]
]

----------------------------------------------------

Checks for booleans.
6 changes: 2 additions & 4 deletions tests/languages/javascript/keyword_feature.test
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
as; async; await; break; case;
catch; class; const; continue; debugger;
default; delete; do; else; enum;
export; extends; false; finally; for;
export; extends; finally; for;
from; function; get; if; implements;
import; in; instanceof; interface; let;
new; null; of; package; private;
protected; public; return; set; static;
super; switch; this; throw; true;
super; switch; this; throw;
try; typeof; var; void; while;
with; yield;

Expand All @@ -30,7 +30,6 @@ with; yield;
["keyword", "enum"], ["punctuation", ";"],
["keyword", "export"], ["punctuation", ";"],
["keyword", "extends"], ["punctuation", ";"],
["keyword", "false"], ["punctuation", ";"],
["keyword", "finally"], ["punctuation", ";"],
["keyword", "for"], ["punctuation", ";"],
["keyword", "from"], ["punctuation", ";"],
Expand All @@ -57,7 +56,6 @@ with; yield;
["keyword", "switch"], ["punctuation", ";"],
["keyword", "this"], ["punctuation", ";"],
["keyword", "throw"], ["punctuation", ";"],
["keyword", "true"], ["punctuation", ";"],
["keyword", "try"], ["punctuation", ";"],
["keyword", "typeof"], ["punctuation", ";"],
["keyword", "var"], ["punctuation", ";"],
Expand Down
2 changes: 1 addition & 1 deletion tests/languages/jsx/tag_feature.test
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var myElement = <MyComponent someProperty={true} />;
["script", [
["punctuation", "="],
["punctuation", "{"],
["keyword", "true"],
["boolean", "true"],
["punctuation", "}"]
]],
["punctuation", "/>"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script runat="server">#foo</script>
<script runat="server">#pragma</script>
<script>/foo/</script>

----------------------------------------------------
Expand All @@ -21,7 +21,7 @@
["punctuation", ">"]
]],
["asp script", [
["preprocessor", "#foo"]
["preprocessor", ["#", ["directive", "pragma"]]]
]],
["tag", [
["tag", [
Expand Down

0 comments on commit e135947

Please sign in to comment.