Skip to main content

shortcode_to_unicode

Function shortcode_to_unicode 

Source
pub fn shortcode_to_unicode(shortcode: &str) -> &str
Expand description

Map a :shortcode: to its unicode character. Covers the ten built-in defaults plus a curated set of the most commonly-used Gitmoji shortcodes (the ones a team [gitmoji] override is statistically likely to swap to — :rocket:, :fire:, :lock:, :art:, :lipstick:, …). Anything outside the table round-trips verbatim: rendering an arbitrary user string under --unicode would require the full 3000-entry Gitmoji set (a heavy dep) and shortcodes remain valid commit-message decoration anyway. The :question: fallback covers the unknown-branch-type path inside resolve_prefix.