Add @ syntax for arbitrary icons
This commit is contained in:
parent
d19670dd47
commit
1b12094381
1 changed files with 10 additions and 0 deletions
|
@ -428,6 +428,16 @@ var scratchblocks = function () {
|
|||
children.push(pIcon());
|
||||
label = null;
|
||||
break;
|
||||
case '@':
|
||||
next();
|
||||
var name = "";
|
||||
while (tok && /[a-zA-Z]/.test(tok)) {
|
||||
name += tok;
|
||||
next();
|
||||
}
|
||||
children.push(Icon.icons.hasOwnProperty(name) ? new Icon(name) : new Label("@" + name));
|
||||
label = null;
|
||||
break;
|
||||
case ':':
|
||||
if (peek() === ':') {
|
||||
children.push(pOverrides(end));
|
||||
|
|
Reference in a new issue