Skip to content

Commit

Permalink
不再对专栏动态进行富文本转换
Browse files Browse the repository at this point in the history
  • Loading branch information
ywmoyue committed May 3, 2024
1 parent 4738532 commit 47ff875
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/BiliLite.UWP/Extensions/DynamicParseExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,16 @@ public static RichTextBlock UserDynamicStringToRichText(
}
}

public static RichTextBlock GetSimpleRichTextBlock(this string txt)
{
var tx = new RichTextBlock();
var paragraph = new Paragraph();
var run = new Run() { Text = txt };
paragraph.Inlines.Add(run);
tx.Blocks.Add(paragraph);
return tx;
}

/// <summary>
/// 处理表情
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ public RichTextBlock Content
{
try
{
if (CardType == Constants.DynamicTypes.ARTICLE && OpusSummary != null)
{
var text = OpusSummary.Summary.Text.Nodes.Aggregate("", (current, textNode) => current + textNode.RawText);
return text.GetSimpleRichTextBlock();
}
if (Desc != null)
{
return
Expand Down

0 comments on commit 47ff875

Please sign in to comment.