mirror of
https://github.com/xoofx/markdig.git
synced 2026-11-16 17:30:52 +00:00
Make EmojiExtension.EnableSmiley public
This commit is contained in:
@@ -12,19 +12,19 @@ namespace Markdig.Extensions.Emoji
|
||||
/// <seealso cref="Markdig.IMarkdownExtension" />
|
||||
public class EmojiExtension : IMarkdownExtension
|
||||
{
|
||||
private readonly bool _enableSmiley;
|
||||
|
||||
public EmojiExtension(bool enableSmiley = true)
|
||||
{
|
||||
_enableSmiley = enableSmiley;
|
||||
EnableSmiley = enableSmiley;
|
||||
}
|
||||
|
||||
public bool EnableSmiley { get; set; }
|
||||
|
||||
public void Setup(MarkdownPipelineBuilder pipeline)
|
||||
{
|
||||
if (!pipeline.InlineParsers.Contains<EmojiParser>())
|
||||
{
|
||||
// Insert the parser before any other parsers
|
||||
pipeline.InlineParsers.Insert(0, new EmojiParser(_enableSmiley));
|
||||
pipeline.InlineParsers.Insert(0, new EmojiParser(EnableSmiley));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user