Emojis don't get converted at the start of links #652

Open
opened 2026-01-29 14:42:09 +00:00 by claunia · 1 comment
Owner

Originally created by @Flayms on GitHub (Feb 4, 2024).

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.

Originally created by @Flayms on GitHub (Feb 4, 2024). With the following code ```c# 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: ```html <p><a href="https://github.com/xoofx/markdig">:clap: a link 👏</a></p> ``` I believe the first emoji should be converted as well.
claunia added the bugPR Welcome! labels 2026-01-29 14:42:10 +00:00
Author
Owner

@Scooletz commented on GitHub (Mar 21, 2024):

This is probably due to: 391f376fa2/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 commented on GitHub (Mar 21, 2024): 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
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#652