Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Jun 6, 2014

Conversation

peruginni
Copy link
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
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
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
Contributor Author

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

@lukeapage
Copy link
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.

None yet

3 participants