Class
Shortcodes
ConsoleMonster.Glyphs
:shortcode: names for emoji (:white_check_mark: is ✅, :warning: is ⚠️, :rocket: is 🚀). Used by markup when Markup.Shortcodes is on and by the emoji presenter; apps add names with Shortcodes.Register. Unknown names stay as written.
Inheritance
- object
- Shortcodes
Methods
public static void Register(string name, string text) #Adds or replaces a shortcode.
Parameters
- name string
- The name without colons, for example deploy.
- text string
- The text it stands for.
public static string Replace(string text) #Replaces every known :name: in a text.
Parameters
- text string
- The text.
Returns
string The text with shortcodes replaced.public static bool TryGet(string name, out string text) #The text of a shortcode.
Parameters
- name string
- The name without colons.
- text string
- The text.
Returns
bool Whether the name is known.