markdig icon indicating copy to clipboard operation
markdig copied to clipboard

Emojis don't get converted at the start of links

Open Flayms opened this issue 1 year ago • 1 comments

With the following code

using Markdig;

var markdown = "[:clap: a link :clap:](https://github.com/xoofx/markdig)";

var pipeline = new MarkdownPipelineBuilder()
    .UseEmojiAndSmiley()
    .Build();

var html = Markdown.ToHtml(markdown, pipeline);

I am getting the following output:

<p><a href="https://github.com/xoofx/markdig">:clap: a link 👏</a></p>

I believe the first emoji should be converted as well.

Flayms avatar Feb 04 '24 13:02 Flayms

This is probably due to: https://github.com/xoofx/markdig/blob/391f376fa22b87494e308091d1b27be83e82f567/src/Markdig/Extensions/Emoji/EmojiParser.cs#L29-L33

The question is whether it's aligned to the spec that requires a space before an emoji https://github.com/xoofx/markdig/blob/master/src/Markdig.Tests/Specs/EmojiSpecs.md

Scooletz avatar Mar 21 '24 15:03 Scooletz