Skip to content

Add support for Slack-flavored markdown - #398

Merged
mysticmind merged 2 commits into
mysticmind:masterfrom
wolframmfg:slack
Feb 21, 2025
Merged

Add support for Slack-flavored markdown#398
mysticmind merged 2 commits into
mysticmind:masterfrom
wolframmfg:slack

Conversation

@Klikini

@Klikini Klikini commented Feb 14, 2025

Copy link
Copy Markdown
Contributor

I added a new SlackFlavored config option:

var config = new ReverseMarkdown.Config {
    SlackFlavored = true
};

When enabled, ReverseMarkdown will:

  • Use * instead of ** for bold
  • Use _ instead of * for italic
  • Use ~ instead of ~~ for strikethrough
  • Use a bullet character () for lists because Slack does not parse lists using * or - when sending messages via the API
  • Throw a SlackUnsupportedTagException when trying to convert the following tags because Slack doesn't support them in messages:
    • <hr>
    • <img>
    • <sup>
    • <table>, including <td> and <tr>

@mysticmind

Copy link
Copy Markdown
Owner

Thanks for the PR, will review tomorrow during my day. I have kick started the CI.

@mysticmind

Copy link
Copy Markdown
Owner

@Klikini Hey, sorry about the electronic silence, had to travel a bit due to personal work. I will review this PR this week and pull it in.

@mysticmind

Copy link
Copy Markdown
Owner

@Klikini The code changes look fine, I will pull it in and make few changes. Is it possible for you to add some unit tests for this functionality?

@Klikini

Klikini commented Feb 19, 2025

Copy link
Copy Markdown
Contributor Author

Sure, I should have some time later this week to work on tests.

@Klikini

Klikini commented Feb 20, 2025

Copy link
Copy Markdown
Contributor Author

Unit tests are done. I only ran them locally under .NET 8, but hopefully they work the same under .NET 6 and 7.

@mysticmind

Copy link
Copy Markdown
Owner

Thank you, will take a look at it in my morning and pull it in.

@mysticmind mysticmind added this to the 4.7.0 milestone Feb 21, 2025
@mysticmind
mysticmind merged commit 762e9c5 into mysticmind:master Feb 21, 2025
@winzig

winzig commented May 22, 2025

Copy link
Copy Markdown

Is this going to be part of an official release @mysticmind

@mysticmind

mysticmind commented May 22, 2025

Copy link
Copy Markdown
Owner

Sorry, have been out with a personal emergency. I will take look and release in the next few days.

@mysticmind

Copy link
Copy Markdown
Owner

@Klikini @winzig I have released v4.7.0 and available in NuGet, this functionality is available to use now.

@Klikini

Klikini commented May 22, 2025

Copy link
Copy Markdown
Contributor Author

Thank you! I hope everything is okay.

@mysticmind

Copy link
Copy Markdown
Owner

Thank you! I hope everything is okay.

Hey @Klikini, thanks for the concern, getting better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants