You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to support font-awesome (now fork-awesome) support. Typing :fa-eye: should render the fork-awesome emoji for that. I know how to do that part (emoji rule overwrite to handle the fa-* emoji's) but i'm stuck at even defining additional shortcuts.
When debugging that shortcut that i'm adding is present in this code (full.mjs in this project):
It's already reduced to just my shortcut. The default ones emojies_shortcuts get lost here.
Next, it's passed into the bare_emoji_plugin via bare_emoji_plugin(md, opts).
So i'm explicitly merging options.shortcuts which solved the issue of my values being gone.
And i'm intentionally disabling a check in normalize_opts.mjs for my entries to stay in there!
Next, i do this rule override:
md.renderer.rules.emoji=function(tokens,idx,options,env,self){// if content starts with fa-consttokenMarkup=tokens[idx].markup;if(tokenMarkup.startsWith('fa-')){return`<i class="fa ${tokenMarkup}"></i>`}else{returntokens[idx].content;}};
Hi,
I'm trying to add additional shortcuts like so:
I'm trying to support font-awesome (now fork-awesome) support. Typing
:fa-eye:
should render the fork-awesome emoji for that. I know how to do that part (emoji rule overwrite to handle the fa-* emoji's) but i'm stuck at even defining additional shortcuts.When debugging that shortcut that i'm adding is present in this code (full.mjs in this project):
However, after the line:
It's already reduced to just my shortcut. The default ones
emojies_shortcuts
get lost here.Next, it's passed into the
bare_emoji_plugin
viabare_emoji_plugin(md, opts)
.In the bare handling this line:
Removes anything that was there, the resulting
opts.shortcuts
is now empty{}
...Am i doing something wrong here?
The text was updated successfully, but these errors were encountered: