Commit 3b739f81224f658e7e95251c229bc64d28515884

Lea Verou 2015-01-15T17:42:07

Merge pull request #467 from cdagnino/julia-lang Added basic support for the julia language

diff --git a/components.js b/components.js
index fb077e3..7a2495c 100644
--- a/components.js
+++ b/components.js
@@ -112,6 +112,10 @@ var components = {
 			"title": "Python",
 			"owner": "multipetros"
 		},
+		"julia": {
+			"title": "julia",
+			"owner": "cdagnino"
+		},
 		"sql": {
 			"title": "SQL",
 			"owner": "multipetros"
diff --git a/components/prism-julia.js b/components/prism-julia.js
new file mode 100644
index 0000000..18eb023
--- /dev/null
+++ b/components/prism-julia.js
@@ -0,0 +1,12 @@
+Prism.languages.julia= {
+	'comment': {
+		pattern: /(^|[^\\])#.*?(\r?\n|$)/g,
+		lookbehind: true
+	},
+	'string': /"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(\\?.)*?\1/g,
+	'keyword' : /\b(abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|let|local|macro|module|print|println|quote|return|try|type|typealias|using|while)\b/g,
+	'boolean' : /\b(true|false)\b/g,
+	'number' : /\b-?(0[box])?(?:[\da-f]+\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/gi,
+	'operator' : /[-+]{1,2}|=?<|=?>|!|={1,2}|&{1,2}|\|?\||\?|\*|\/|~|\^|%|\b(or|and|not)\b/g,
+	'punctuation' : /[{}[\];(),.:]/g
+};
\ No newline at end of file
diff --git a/components/prism-julia.min.js b/components/prism-julia.min.js
new file mode 100644
index 0000000..ca3344b
--- /dev/null
+++ b/components/prism-julia.min.js
@@ -0,0 +1 @@
+Prism.languages.julia={comment:{pattern:/(^|[^\\])#.*?(\r?\n|$)/g,lookbehind:!0},string:/"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(\\?.)*?\1/g,keyword:/\b(abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|let|local|macro|module|print|println|quote|return|try|type|typealias|using|while)\b/g,"boolean":/\b(true|false)\b/g,number:/\b-?(0[box])?(?:[\da-f]+\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/gi,operator:/[-+]{1,2}|=?<|=?>|!|={1,2}|&{1,2}|\|?\||\?|\*|\/|~|\^|%|\b(or|and|not)\b/g,punctuation:/[{}[\];(),.:]/g};
\ No newline at end of file