Emoji Shortcodes β
BachMark supports emoji shortcodes β short text identifiers wrapped in colons that resolve to emoji characters. If you've used GitHub, Slack, or Discord, this syntax will feel familiar.
Basic syntax β
Wrap a shortcode in colons:
This feature is great :rocket:
BachMark supports :thumbsup: and :thumbsdown: reactions.
:warning: Be careful with this setting.β Renders as: This feature is great π
The shortcode is replaced with the corresponding Unicode emoji character. The colon syntax is removed from the output β it's purely a source-level convenience.
Shortcode names β
BachMark uses the standard emoji shortcode set used by GitHub. A few common examples:
| Shortcode | Emoji | Description |
|---|---|---|
:smile: | π | Smiling face |
:thumbsup: | π | Thumbs up |
:thumbsdown: | π | Thumbs down |
:rocket: | π | Rocket |
:warning: | β οΈ | Warning sign |
:white_check_mark: | β | Check mark |
:x: | β | Cross mark |
:bulb: | π‘ | Light bulb |
:memo: | π | Memo |
:fire: | π₯ | Fire |
:star: | β | Star |
:heart: | β€οΈ | Red heart |
:construction: | π§ | Under construction |
:tada: | π | Party popper |
:lock: | π | Lock |
:key: | π | Key |
:bug: | π | Bug |
:gear: | βοΈ | Gear |
:clipboard: | π | Clipboard |
:link: | π | Link |
This is a small sample. The full list follows the GitHub emoji shortcode set, which covers thousands of emoji.
Where shortcodes work β
Emoji shortcodes are inline content and work anywhere inline content is allowed β paragraphs, headings, list items, table cells, callouts, and badges:
## :rocket: Getting Started
- :white_check_mark: Parser complete
- :construction: Renderer in progress
- :x: Spec not started
| Feature | Status |
| ----------- | ----------------------- |
| Parsing | :white_check_mark: Done |
| Rendering | :construction: WIP |
::: tip :bulb: Pro tip
You can use emoji in callout titles too.
:::Shortcodes vs. Unicode emoji β
You can always use Unicode emoji characters directly in your BachMark source:
This works too: π π β
Shortcodes are a convenience β they're easier to type, easier to read in source, and don't require an emoji picker. Both approaches produce the same output. Use whichever you prefer.
Literal colons β
Shortcodes are only recognized when the text between colons matches a known emoji name. Colons in normal text are not affected:
The time is 12:30. <!-- not a shortcode β "30" is not an emoji -->
See section 3:results. <!-- not a shortcode β "results" is not an emoji -->
Mix ratio is 1:1. <!-- not a shortcode -->If you need a literal colon pair around a word that happens to match an emoji name, escape one of the colons:
The symbol is called \:star: in the codebase.β Renders as: The symbol is called :star: in the codebase.
Shortcodes inside code β
Emoji shortcodes are not processed inside fenced code blocks or inline code spans β the text is preserved literally:
```
:rocket: stays as text in code blocks.
```The syntax is `:rocket:` with colons on both sides.In both cases, the :rocket: text appears as-is in the output.
Parsing rules β
- A shortcode starts with
:followed by one or more lowercase letters, digits, underscores, or hyphens (-), and ends with:. - No spaces are allowed inside the colons.
: rocket :is not a shortcode. - The text between colons is matched against the known emoji set. If no match is found, the text is left as-is (colons included) β no warning is emitted, since false positives from normal colon usage would be noisy.
- Shortcodes are resolved during inline parsing, after code spans are identified but before other inline formatting is applied.
Rendering behavior β
| Output | Behavior |
|---|---|
| HTML | Replaced with the Unicode emoji character. The renderer may wrap it in a <span> for consistent sizing. |
| Replaced with the Unicode emoji character. The renderer uses an emoji-capable font for display. |