Closed bartels closed 11 years ago
On Thu, November 14, 2013 22:49, Eric Bartels wrote:
This works fine: rgba(255, 255, 0, 0.7)
Without the leading zero for the alpha value, we get no color highlighting: rgba(255, 255, 0, .7)
Looks like a quick fix to make the leading zero optional in the regex on line 1112:
\ 'rgba': ['rgba(\s*\%(\d\+%\?\D*\)\{3}\%(\%(0?\%(.\d\+\)\?\)\|1\))',
function("s:ColorRGBValues")],
Yes, that would probably work (besides, that it should be 0\?.
But this doesn't seem to be supported by the standard, is it?
Best, Christian
Ah, yes thanks for catching the typo. it should be 0\?
Yeah, I was not totally sure if it's part of the standard. Browsers support it. I do see that format used pretty frequently, for example in the Bootstrap source code. I found this
Quote:
A
can either be an , or it can be zero or more digits followed by a dot (.) followed by one or more digits.
It seems to suggest the initial digit before the dot is optional.
Thanks for the great plugin!
Hi Eric!
On Do, 14 Nov 2013, Eric Bartels wrote:
Ah, yes thanks for catching the typo. it should be
0\?
Yeah, I was not totally sure if it's part of the standard. Browsers support it. I do see that format used pretty frequently, for example in the Bootstrap source code. I found this
Quote:
A
can either be an , or it can be zero or more digits followed by a dot (.) followed by one or more digits. It seems to suggest the initial digit before the dot is optional.
Thanks for the great plugin!
This should be fixed by now. Please confirm.
Best,
Und nimmer kann ein Mensch, wie sehr er sich vermißt, Im Auge andrer Leute sein, was er nicht ist. -- Nicolas Boileau-Despréaux (Satiren)
Yes, that seems to do it. Thanks.
Btw, looks like some merge conflict cruft made its way into the latest commit: https://github.com/chrisbra/color_highlight/commit/0f346052ffe032e09ff9fb8992ea8e891afa5e02#diff-fed2dd0c6e6cf9ea53a80bf24675c546R54
Thanks, I removed them.
This works fine: rgba(255, 255, 0, 0.7)
Without the leading zero for the alpha value, we get no color highlighting: rgba(255, 255, 0, .7)
Looks like a quick fix to make the leading zero optional in the regex on line 1112: