-
Notifications
You must be signed in to change notification settings - Fork 76
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
Improve code point parsing #68
base: master
Are you sure you want to change the base?
Conversation
Also throws a validation error when the codepoint could not be parsed
return value.match(/^((0x[\d[a-f]+)|(\d+))$/gi) | ||
} | ||
|
||
function parseCodePoint(codePoint, propName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is possible to consider parse value which ise recived from json outpu like '\f101' ?
Or maybe is possible to get json for icon-font-generator with js unicode like "\uf101' ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the code to support CSS unicode escape codes. I think this should do what you ask for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Hammie really thank You for that. This is exactly what i wont.
return value.match(/^((0x[\d[a-f]+)|(\d+))$/gi) | ||
} | ||
|
||
function parseCodePoint(codePoint, propName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Hammie really thank You for that. This is exactly what i wont.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Improve code point parsing to support unicode literals as value
Also throws a validation error when the codepoint could not be parsed
See issues #54 #56