0.1.0 • Published 7 years ago

quaint-emoji v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

quaint-emoji

Use emojis in your Quaint documents.

The svg/png emojis provided by quaint-emoji are the excellent ones designed by Emoji One.

Install

quaint --setup emoji

Follow the instructions.

Sample configuration

This configuration entry must be added in the plugins field of quaint.json:

"emoji": {
  "method": "svg",
  "fuzzy": true
}

Sample use

The :cat: is in the :top_hat:!

Rules

:name:

Inserts the emoji with the given name. This must be an exact match. You can search the codes here.

If the fuzzy options is enabled, quaint-emoji will search for some emoji that matches what you have written. For instance, there is no :tree: emoji, but with fuzzy enabled, you will still get something, like :evergreen_tree:.

!! name

Same as :name:.

Options

fuzzy

(default: false)

If true, if there is no emoji with the exact name you have given, quaint-emoji will search for one that has a name matching what you have written.

For instance, there is no :tree: emoji, but with fuzzy enabled, you will still get something, like :evergreen_tree:. If it's close enough to what you want, at least that saves some time searching ;)

To match :x:, fuzzy tries to find, in this order:

  1. An emoji that starts with x_
  2. An emoji that ends with _x
  3. An emoji that starts with x
  4. An emoji that ends with x

If there are multiple matches at one step, which one is picked is arbitrary and might change in a future version (but always towards a better match).

method

(default: "svg")

This option controls which emoji set to show, which image format to use, and can take the following values:

  • "svg": use svg icons from Emoji One (served through cdnjs)
  • "png": use png icons from Emoji One (served through cdnjs)
  • "unicode": insert unicode code points directly

operator

(default: "!!")

The prefix operator to use for emojis, or null.