Skip to content

Commit

Permalink
[simple] minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
carduz committed Sep 13, 2016
1 parent 286dd26 commit ed7710c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "material-icons-translator",
"version": "0.1.4",
"version": "0.1.5",
"description": "This library translates all occurrences of material icons name to the unicode form",
"main": "index.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/MaterialIconsTranslator.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ module.exports = class MaterialIconsTranslator{

static replacer(match, p1, p2, p3, offset, string) {
// p1 is nondigits, p2 digits, and p3 non-alphanumerics
return p1 + MaterialIconsTranslator.getUnicode(p2) + p3; //TODO null
p2 = MaterialIconsTranslator.getUnicode(p2) || p2;
return [p1, p2, p3].join('');
}

static getUnicode(name){
Expand Down

0 comments on commit ed7710c

Please sign in to comment.