Skip to content

Commit

Permalink
钉钉发送Markdown消息时,要FormatMarkdown预处理,**后面保留一个空格,否则会粘粘在一起
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Aug 7, 2024
1 parent b1a0684 commit fa1968a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Stardust/DingTalk/DingTalkClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ public void SendText(String content, String[] mentions)
public String FormatMarkdown(String text)
{
// 换行
text = text.Replace(Environment.NewLine, "\n\n");
text = text.Replace(Environment.NewLine, " \n ");
// 经测试 手机不支持<br/> 后期支持了再删除 这要在放在处理完换行以后
text = text.Replace("<br/>", "\n");
text = text.Replace("<br/>", " \n ");

// 经测试 手机不支持<font color="red"> 只支持HEX值
text = text.Replace("<font color=\"info\">", "<font color=\"#B3B3B3\">");
Expand Down

0 comments on commit fa1968a

Please sign in to comment.