From 6a7000cbc9b5daab3ba3f0917e4185236f23606b Mon Sep 17 00:00:00 2001 From: Alexey Golub Date: Fri, 27 Oct 2017 21:34:45 +0300 Subject: [PATCH] Re-order URL formatting in HTML formatter Slightly helps #18 --- DiscordChatExporter/Services/ExportService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DiscordChatExporter/Services/ExportService.cs b/DiscordChatExporter/Services/ExportService.cs index 876634b2..a39134ba 100644 --- a/DiscordChatExporter/Services/ExportService.cs +++ b/DiscordChatExporter/Services/ExportService.cs @@ -249,9 +249,6 @@ namespace DiscordChatExporter.Services // Pre inline (`text`) content = Regex.Replace(content, "`([^`]+)`", "$1"); - // URL links - content = Regex.Replace(content, "((https?|ftp)://[^\\s/$.?#].[^\\s]*)", "$1"); - // Bold (**text**) content = Regex.Replace(content, "\\*\\*([^\\*]*?)\\*\\*", "$1"); @@ -270,6 +267,9 @@ namespace DiscordChatExporter.Services // New lines content = content.Replace("\n", "
"); + // URL links + content = Regex.Replace(content, "((https?|ftp)://[^\\s/$.?#].[^\\s<>]*)", "$1"); + // Meta mentions (@everyone) content = content.Replace("@everyone", "@everyone");