Skip to content

Commit

Permalink
Fixes Mikhus#27 rgb[a] colour format in html
Browse files Browse the repository at this point in the history
Use regular expression to match groups of highlight options, rather than
splitting on comma (which breaks if rgba(x,y,z,a) string is used)
  • Loading branch information
gregroper committed Apr 30, 2014
1 parent 9062f91 commit b986c5d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gauge.js
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ domReady( function() {
config.highlights = [];
}

var hls = attrValue.split( ',');
var hls = attrValue.match(/(?:(?:-?\d*\.)?(-?\d+){1,2} ){2}(?:(?:#|0x)?(?:[0-9A-F|a-f]){3,8}|rgba?\(.*?\))/g);

for (var j = 0, l = hls.length; j < l; j++) {
var
Expand Down
6 changes: 3 additions & 3 deletions gauge.min.js

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

Loading

0 comments on commit b986c5d

Please sign in to comment.