From a7fcbf60fa47d7502bfcf4025183b6adcf1bc8ea Mon Sep 17 00:00:00 2001 From: Wizou Date: Thu, 30 Dec 2021 17:50:43 +0100 Subject: [PATCH] MarkdownToEntities allows spoiler with ~~ --- src/TL.Helpers.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/TL.Helpers.cs b/src/TL.Helpers.cs index 05a2338..4c34199 100644 --- a/src/TL.Helpers.cs +++ b/src/TL.Helpers.cs @@ -498,7 +498,15 @@ namespace TL { case '\\': sb.Remove(offset++, 1); break; case '*': ProcessEntity(); break; - case '~': ProcessEntity(); break; + case '~': + if (offset + 1 < sb.Length && sb[offset + 1] == '~') + { + sb.Remove(offset, 1); + ProcessEntity(); + } + else + ProcessEntity(); + break; case '_': if (offset + 1 < sb.Length && sb[offset + 1] == '_') {