mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-19 02:12:49 +08:00

Generalized the search to work with any table with some basic classes and some updated JavaScript, we can now search colors and emojis.
1.5 KiB
1.5 KiB
Title: Emojis Order: 3
Please note that what emojis that can be used is completely up to the operating system and/or terminal you're using, and no guarantees can be made of how it will look. Calculating the width of emojis is also not an exact science in many ways, so milage might vary when used in tables, panels or grids.
To ensure best compatibility, consider only using emojis introduced
before Unicode 13.0 that belongs in the Emoji_Presentation
category
in the official emoji list at
https://www.unicode.org/Public/UCD/latest/ucd/emoji/emoji-data.txt
Usage
// Markup
AnsiConsole.MarkupLine("Hello :globe_showing_europe_africa:!");
// Constant
var hello = "Hello " + Emoji.Known.GlobeShowingEuropeAfrica;
Replacing emojis in text
var phrase = "Mmmm :birthday_cake:";
var rendered = Emoji.Replace(phrase);
Emojis
The images in the table below might not render correctly in your
browser for the same reasons mentioned in the Compatibility
section.