-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Брозовский Максим #234
base: master
Are you sure you want to change the base?
Брозовский Максим #234
Conversation
cs/Markdown/IConverter.cs
Outdated
|
||
namespace Markdown; | ||
|
||
public interface IConverter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Конвертер чего?
cs/Markdown/Tags/ITag.cs
Outdated
bool IsOpenedCorrectly((char left, char right) contextChars); | ||
bool IsClosedCorrectly((char left, char right) contextChars); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Выдели мб отдельную модельку под это? Таплы передавать публично плохая практика. У тебя уже два места, где одна и та же модель используется. При изменении одно из этих мест надо отдельно помнить и о другом
cs/Markdown/Tags/PairTag.cs
Outdated
@@ -0,0 +1,12 @@ | |||
namespace Markdown.Tags; | |||
|
|||
public abstract class PairTag : ITag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Чет не отразил чем отличается от одинарного
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
И как определяем закрываюищий тег?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
для MdTag добавил, а HtmlTag там симметричный, т.е. <HtmlTag></HtmlTag>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Чет не отразил чем отличается от одинарного
Главное отличие в том, что у одинарного не будет закрвающего MdTag и он действует на всю строчку, а для HtmlTag мы делаем как в коментарии выше - симметрично
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Но там тоже могут быть особые случаи типа <img> тега....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
но мне кажется это уже отвественность IMdConverter, как он будет эти токены укладывать в строку
cs/Markdown/Tokens/TagToken.cs
Outdated
|
||
namespace Markdown.Tokens; | ||
|
||
public class TagToken(ITag tag, char left, char right) : IToken |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А почему char? Например, __ - это два подчеркивания.
cs/Markdown/Tags/ItalicTag.cs
Outdated
@@ -0,0 +1,9 @@ | |||
namespace Markdown.Tags; | |||
|
|||
public class ItalicTag : PairTag, ITag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А зачем интерфейс еще раз указывать?
No description provided.