Skip to content
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

Emojis as separate import #753

Open
ohepworthbell opened this issue Nov 23, 2019 · 0 comments
Open

Emojis as separate import #753

ohepworthbell opened this issue Nov 23, 2019 · 0 comments

Comments

@ohepworthbell
Copy link

I know this issue has sort of been raised in issue #504 and more explicitly in #408, but is there anything in the pipeline for separating emojis into a completely different file? As ShowdownJS can be imported using require() or even ES6 import it would be great to have emojis as a completely separate module that can independently be imported, such like:

import showdown from 'showdown';
// No emojis

or

import {showdown, emojis} from 'showdown';
// Has emojis

That would give much more control over those who don't need/want/require emoji support, and can give much more ability to keep ShowdownJS as customisably streamlined as possible for the speed-conscious folk.

In the long-run, it would be great to also be able to break down the (e.g.) 'flavours' and other 'options' into modules too, to really allow people to further streamline their bundles, something like:

import {showdown, tables, specialChars, emojis} from 'showdown';

new showdown.Converter({
  tables: true,
  specialChars: true,
  emojis: true
});

or

import {showdown, github} from 'showdown';

// And 'github' automatically imports 'tables', 'specialChars', etc...
// Also have 'github' and 'githubNoEmoji'

new showdown.Converter({
  tables: true,
  specialChars: true,
  emojis: true
});

Would be a really sweet addition to the library :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant