#if os(macOS) enum GitHubEmoji { static func replaceShortcodes(in text: String) -> String { text.replacing(/:([\w+-]+):/) { match in shortcodes[String(match.1)] ?? String(match.0) } } /// Common GitHub / gitmoji shortcodes β†’ Unicode emoji private static let shortcodes: [String: String] = [ // Gitmoji (commit conventions) "art": "🎨", "zap": "⚑", "fire": "πŸ”₯", "bug": "πŸ›", "ambulance": "πŸš‘", "sparkles": "✨", "memo": "πŸ“", "rocket": "πŸš€", "lipstick": "πŸ’„", "tada": "πŸŽ‰", "white_check_mark": "βœ…", "lock": "πŸ”’", "closed_lock_with_key": "πŸ”", "bookmark": "πŸ”–", "rotating_light": "🚨", "construction": "🚧", "green_heart": "πŸ’š", "arrow_down": "⬇️", "arrow_up": "⬆️", "pushpin": "πŸ“Œ", "construction_worker": "πŸ‘·", "chart_with_upwards_trend": "πŸ“ˆ", "recycle": "♻️", "heavy_plus_sign": "βž•", "heavy_minus_sign": "βž–", "wrench": "πŸ”§", "hammer": "πŸ”¨", "globe_with_meridians": "🌐", "pencil2": "✏️", "pencil": "πŸ“", "poop": "πŸ’©", "rewind": "βͺ", "twisted_rightwards_arrows": "πŸ”€", "package": "πŸ“¦", "alien": "πŸ‘½", "truck": "🚚", "page_facing_up": "πŸ“„", "boom": "πŸ’₯", "bento": "🍱", "wheelchair": "β™Ώ", "bulb": "πŸ’‘", "beers": "🍻", "speech_balloon": "πŸ’¬", "card_file_box": "πŸ—ƒοΈ", "loud_sound": "πŸ”Š", "mute": "πŸ”‡", "busts_in_silhouette": "πŸ‘₯", "children_crossing": "🚸", "building_construction": "πŸ—οΈ", "iphone": "πŸ“±", "clown_face": "🀑", "egg": "πŸ₯š", "see_no_evil": "πŸ™ˆ", "camera_flash": "πŸ“Έ", "alembic": "βš—οΈ", "mag": "πŸ”", "label": "🏷️", "seedling": "🌱", "triangular_flag_on_post": "🚩", "goal_net": "πŸ₯…", "dizzy": "πŸ’«", "wastebasket": "πŸ—‘οΈ", "passport_control": "πŸ›‚", "adhesive_bandage": "🩹", "monocle_face": "🧐", "coffin": "⚰️", "test_tube": "πŸ§ͺ", "necktie": "πŸ‘”", "stethoscope": "🩺", "bricks": "🧱", "technologist": "πŸ§‘β€πŸ’»", // Common faces & people "smile": "πŸ˜„", "laughing": "πŸ˜†", "blush": "😊", "smiley": "πŸ˜ƒ", "grinning": "πŸ˜€", "wink": "πŸ˜‰", "heart_eyes": "😍", "kissing_heart": "😘", "sunglasses": "😎", "thinking": "πŸ€”", "thumbsup": "πŸ‘", "+1": "πŸ‘", "thumbsdown": "πŸ‘Ž", "-1": "πŸ‘Ž", "clap": "πŸ‘", "pray": "πŸ™", "wave": "πŸ‘‹", "raised_hands": "πŸ™Œ", "ok_hand": "πŸ‘Œ", "point_up": "☝️", "point_down": "πŸ‘‡", "point_left": "πŸ‘ˆ", "point_right": "πŸ‘‰", "muscle": "πŸ’ͺ", // Hearts & symbols "heart": "❀️", "broken_heart": "πŸ’”", "star": "⭐", "star2": "🌟", "warning": "⚠️", "x": "❌", "heavy_check_mark": "βœ”οΈ", "question": "❓", "exclamation": "❗", "bangbang": "‼️", "interrobang": "⁉️", "100": "πŸ’―", // Objects & nature "gear": "βš™οΈ", "key": "πŸ”‘", "link": "πŸ”—", "shield": "πŸ›‘οΈ", "bell": "πŸ””", "no_bell": "πŸ”•", "clipboard": "πŸ“‹", "books": "πŸ“š", "book": "πŸ“–", "computer": "πŸ’»", "desktop_computer": "πŸ–₯️", "electric_plug": "πŸ”Œ", "battery": "πŸ”‹", "floppy_disk": "πŸ’Ύ", "file_folder": "πŸ“", "open_file_folder": "πŸ“‚", "calendar": "πŸ“…", "clock1": "πŸ•", "hourglass": "βŒ›", "stopwatch": "⏱️", "timer_clock": "⏲️", "inbox_tray": "πŸ“₯", "outbox_tray": "πŸ“€", "envelope": "βœ‰οΈ", "email": "πŸ“§", "newspaper": "πŸ“°", "scroll": "πŸ“œ", "trophy": "πŸ†", "medal_sports": "πŸ…", "gem": "πŸ’Ž", "hammer_and_wrench": "πŸ› οΈ", "nut_and_bolt": "πŸ”©", "chains": "⛓️", "magnet": "🧲", "trash": "πŸ—‘οΈ", "world_map": "πŸ—ΊοΈ", // Arrows & indicators "arrow_right": "➑️", "arrow_left": "⬅️", "arrow_upper_right": "↗️", "arrow_lower_right": "β†˜οΈ", "arrows_counterclockwise": "πŸ”„", "back": "πŸ”™", "new": "πŸ†•", "up": "πŸ†™", "cool": "πŸ†’", "free": "πŸ†“", "information_source": "ℹ️", // Nature & weather "sunny": "β˜€οΈ", "cloud": "☁️", "snowflake": "❄️", "rainbow": "🌈", "ocean": "🌊", "leaves": "πŸƒ", "four_leaf_clover": "πŸ€", "evergreen_tree": "🌲", "deciduous_tree": "🌳", "cactus": "🌡", "cherry_blossom": "🌸", "rose": "🌹", "sunflower": "🌻", "herb": "🌿", ] } #endif