Skip to content

Commit

Permalink
Julia: Simplify comment regexp + improved number regexp + improved op…
Browse files Browse the repository at this point in the history
…erator regexp
  • Loading branch information
Golmote committed Aug 25, 2015
1 parent ac792bd commit bcac7d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions components/prism-julia.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Prism.languages.julia= {
'comment': {
pattern: /(^|[^\\])#.*?(\r?\n|$)/,
pattern: /(^|[^\\])#.*/,
lookbehind: true
},
'string': /"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(\\?.)*?\1/,
'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/,
'boolean' : /\b(true|false)\b/,
'number' : /\b-?(0[box])?(?:[\da-f]+\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,
'operator' : /[-+]{1,2}|=?<|=?>|!|={1,2}|&{1,2}|\|?\||\?|\*|\/|~|\^|%|\b(or|and|not)\b/,
'number' : /\b-?(0[box])?(?:[\da-f]+\.?\d*|\.\d+)(?:[efp][+-]?\d+)?j?\b/i,
'operator': /\+=?|-=?|\*=?|\/[\/=]?|\\=?|\^=?|%=?|÷=?|!=?=?|&=?|\|[=>]?|\$=?|<(?:<=?|[=:])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥]/,
'punctuation' : /[{}[\];(),.:]/
};
2 changes: 1 addition & 1 deletion components/prism-julia.min.js

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

0 comments on commit bcac7d4

Please sign in to comment.