mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-08-02 18:17:30 +08:00
Update emoji support
* Add constants for emojis * Move emoji shortcode rendering to Markup * Add documentation * Add example * Add tests
This commit is contained in:

committed by
Patrik Svensson

parent
090b30f731
commit
eeb3f967b6
20
docs/src/Models/Emoji.cs
Normal file
20
docs/src/Models/Emoji.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Docs.Models
|
||||
{
|
||||
public sealed class Emoji
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Code { get; set; }
|
||||
|
||||
public static List<Emoji> Parse(string json)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<List<Emoji>>(json);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user