Closed aviadl closed 6 years ago
I don't like idea to extend API, if you can reach the same effect with existing one.
Would prefer to reject PR, but may be you could explain why this new option is super awesome.
@puzrin not sure how can i get the same result with existing API. My problem is that i want all the great emojies accept one that gives me problems. Couldn't find another way to do it, but would be happy to learn
All data files are available separate, to allow modifications. Just load content, filter by your needs and pass to options.
https://github.com/markdown-it/markdown-it-emoji/blob/master/index.js#L4
let data_to_filter = require('markdown-it-emoji/lib/data/full.json');
You are right, we managed to make it work But now instaed of:
...
plugins: [
(md) => { emoji(md, { disabled: ['ab'] }); }
]
...
I need
import emojiesDefs from 'markdown-it-emoji/lib/data/full.json';
delete emojiesDefs.ab;
const enabledEmojies = Object.keys(emojiesDefs);
...
plugins: [
(md) => { emoji(md, { enabled: enabledEmojies }); }
]
...
Looks more hacky to me, but it is your call
Closing then. Let's keep api simple.
@puzrin is there a chance to review and merge this?