diff --git a/src/BiliLite.UWP/Extensions/DynamicParseExtensions.cs b/src/BiliLite.UWP/Extensions/DynamicParseExtensions.cs index b094d69a8..5512073ee 100644 --- a/src/BiliLite.UWP/Extensions/DynamicParseExtensions.cs +++ b/src/BiliLite.UWP/Extensions/DynamicParseExtensions.cs @@ -124,7 +124,7 @@ public static RichTextBlock UserDynamicStringToRichText( } catch (Exception ex) { - _logger.Error($"用户动态文本转富文本失败:{id}:", ex); + _logger.Error($"用户动态文本转富文本失败:{id} : {txt}||{input}", ex); var tx = new RichTextBlock(); var paragraph = new Paragraph(); var run = new Run() { Text = txt }; diff --git a/src/BiliLite.UWP/Extensions/StringExtensions.cs b/src/BiliLite.UWP/Extensions/StringExtensions.cs index 180520465..6ff692b52 100644 --- a/src/BiliLite.UWP/Extensions/StringExtensions.cs +++ b/src/BiliLite.UWP/Extensions/StringExtensions.cs @@ -135,7 +135,7 @@ public static RichTextBlock ToRichTextBlock(this string txt, JObject emote, bool } catch (Exception ex) { - _logger.Error($"富文本转换失败: {txt}", ex); + _logger.Error($"富文本转换失败: {txt} || {input}", ex); var tx = new RichTextBlock(); Paragraph paragraph = new Paragraph(); Run run = new Run() { Text = txt }; @@ -387,7 +387,7 @@ private static string HandelVideoID(string input) List keyword = new List(); List> haveHandledOffset = new List>(); //如果是链接就不处理了 - if (!Regex.IsMatch(input, @"/[aAbBcC][vV]([a-zA-Z0-9]+)")) + if (!Regex.IsMatch(input, @"(?<=://)[^\s]*[aAbBcC][vV]([a-zA-Z0-9]+)")) { var offset = 0;