Skip to content

Added condition to check if HEX code contain only valid characters (issue #1015)#1976

Merged
lukeapage merged 3 commits intoless:masterfrom
peruginni:master
Jun 6, 2014
Merged

Added condition to check if HEX code contain only valid characters (issue #1015)#1976
lukeapage merged 3 commits intoless:masterfrom
peruginni:master

Conversation

@peruginni
Copy link
Copy Markdown
Contributor

Hello,

I have fixed issue #1015. Less was recognizing HEX code of length 3 inside intended longer HEX code, where were invalid hexadecimal characters.

This is my first contribution to less.js, so if there is something I missed - please tell me, I will gladly improve it. Have a nice day,

Ondra

@seven-phases-max
Copy link
Copy Markdown
Member

I have fixed the similar problems of color function in 3322609. Probably we should consider to re-use the same code somehow as there're more issues than just "incorrect characters". See [6] examples in #1604.

@lukeapage
Copy link
Copy Markdown
Member

I'm not sure how they could be merged. I would only make the error less specific and remove the length check.. e.g. this would catch

#fffblack

Where they have missed a space.

@peruginni
Copy link
Copy Markdown
Contributor Author

Thank you for answers. Tomorrow I will fix it to cover missed space case and add better error text.

@lukeapage
Copy link
Copy Markdown
Member

great thanks.

lukeapage added a commit that referenced this pull request Jun 6, 2014
Added condition to check if HEX code contain only valid characters (issue #1015)
@lukeapage lukeapage merged commit c872caa into less:master Jun 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants