Skip to content
ConsoleMonster
Class

Shortcodes

ConsoleMonster.Glyphs

Namespace
ConsoleMonster.Glyphs
Assembly
ConsoleMonster
Modifiers
static

: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 required
The name without colons, for example deploy.
text string required
The text it stands for.
public static string Replace(string text) #

Replaces every known :name: in a text.

Parameters

text string required
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 required
The name without colons.
text string required
The text.

Returns

bool Whether the name is known.