No need to escape MarkdownV2 chars in code sections

This commit is contained in:
Wizou 2024-07-20 02:06:40 +02:00
parent 4946322045
commit d5101b4f3b
2 changed files with 6 additions and 6 deletions

View file

@ -10,8 +10,7 @@ All the Telegram Client APIs (MTProto) are supported so you can do everything th
This ReadMe is a **quick but important tutorial** to learn the fundamentals about this library. Please read it all. This ReadMe is a **quick but important tutorial** to learn the fundamentals about this library. Please read it all.
> [!IMPORTANT] > ⚠️ This library requires understanding advanced C# techniques such as **asynchronous programming** or **subclass pattern matching**...
> This library requires understanding advanced C# techniques such as **asynchronous programming** or **subclass pattern matching**...
> If you are a beginner in C#, starting a project based on this library might not be a great idea. > If you are a beginner in C#, starting a project based on this library might not be a great idea.
# How to use # How to use
@ -115,7 +114,6 @@ See [WinForms example](https://wiz0u.github.io/WTelegramClient/Examples/WinForms
# Example of API call # Example of API call
> [!NOTE]
> The Telegram API makes extensive usage of base and derived classes, so be ready to use the various C# syntaxes > The Telegram API makes extensive usage of base and derived classes, so be ready to use the various C# syntaxes
to check/cast base classes into the more useful derived classes (`is`, `as`, `case DerivedType` ) to check/cast base classes into the more useful derived classes (`is`, `as`, `case DerivedType` )

View file

@ -295,9 +295,11 @@ namespace TL
} }
switch (lastCh = sb[i]) switch (lastCh = sb[i])
{ {
case '_': case '*': case '~': case '`': case '#': case '+': case '-': case '=': case '.': case '!': case '_': case '*': case '~': case '#': case '+': case '-': case '=': case '.': case '!':
case '[': case ']': case '(': case ')': case '{': case '}': case '>': case '|': case '\\': case '[': case ']': case '(': case ')': case '{': case '}': case '>': case '|': case '\\':
if (closings.Count == 0 || closings[0].md[0] != '`') if (closings.Count != 0 && closings[0].md[0] == '`') break;
goto case '`';
case '`':
sb.Insert(i++, '\\'); sb.Insert(i++, '\\');
break; break;
} }