Skip to content

Conversation

@AlexKorobitsyn
Copy link

No description provided.


public class TextHTML
{
string html_data_;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В C# принят camelCase, давай здесь и дальше по коду этого придерживаться?

@@ -0,0 +1,8 @@
namespace DefaultNamespace;

public class TextHTML
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А для чего нужен отдельный тип, который оборачивает строку? Какую логику он будет в себе инкапсулировать?

{}
string Data
{
get
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно писать просто get;, если не требуется какая-то особая логика при получении значения


TextMarkDown(string text) // Берёт текст и заполняет массив token
{}
string Data
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут не хватает модификатора + ниже тоже

private Tuple<int, int> index_; //содержание токена, индекс начала и конца
TokenType TokenType
{
get { return type; }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут тоже достаточно { get; set; }. Расписывать базовую реализацию не нужно

public class Token
{
private TokenType type_; //тип токена
private Tuple<int, int> index_; //содержание токена, индекс начала и конца
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Скорее всего это не индекс, а какой-то отрезок или интервал. Давай подберем более говорящее название? + Кортеж значений вида (int Begin, int End) ... будет выглядеть чуть прозрачнее, посмотри в эту сторону. Будет круто, если опишешь преимущества такого типа над обычным Tupl'ом

{
Italic,
Bold,
Escaped,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Подсвети, пожалуйста, что это за тип токена? + Понадобится ли тип Text?

@Luvr681
Copy link

Luvr681 commented Nov 5, 2025

Относится ко всему решению
Посмотри в сторону выделения отдельных модулей, которые выполняют какие-то свои минорные функции
Можно, конечно, ограничится одним методом рендеринга, но удобнее, если метод будет дергать другие
Тогда поддержка и развитие этой логики будут стоит гораздо меньше

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants