Skip to content

Commit

Permalink
Go: improved operator regexp + removed punctuation from it
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Aug 20, 2015
1 parent f618948 commit 776ab90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/prism-go.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Prism.languages.go = Prism.languages.extend('clike', {
'keyword': /\b(break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,
'builtin': /\b(bool|byte|complex(64|128)|error|float(32|64)|rune|string|u?int(8|16|32|64|)|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(ln)?|real|recover)\b/,
'boolean': /\b(_|iota|nil|true|false)\b/,
'operator': /([(){}\[\]]|[*\/%^!]=?|\+[=+]?|-[>=-]?|\|[=|]?|>[=>]?|<(<|[=-])?|==?|&(&|=|^=?)?|\.(\.\.)?|[,;]|:=?)/,
'operator': /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,
'number': /\b(-?(0x[a-f\d]+|(\d+\.?\d*|\.\d+)(e[-+]?\d+)?)i?)\b/i,
'string': /("|'|`)(\\?.|\r|\n)*?\1/
});
Expand Down
2 changes: 1 addition & 1 deletion components/prism-go.min.js

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

0 comments on commit 776ab90

Please sign in to comment.