-
Notifications
You must be signed in to change notification settings - Fork 1
PR #1
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
base: To-PR
Are you sure you want to change the base?
PR #1
Conversation
корректно обрабатываю все с "_"
Markdown/HtmlToken.cs
Outdated
| ? $"<{tag.Html}>{dataToInsert}</{tag.Html}>" | ||
| : dataToInsert; | ||
|
|
||
| public override string ToString() |
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.
:(
Markdown/Md.cs
Outdated
|
|
||
| if (Equals(tag, Tag.Em)) | ||
| { | ||
| parsedTokens.Add(new HtmlToken(Tag.Empty, tokenData.ToString(), alreadyEscaped)); |
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.
а вот весь этот блок в ифе никак нельзя как-нибудь вынести, а то уж слишкоом много действий в одном месте и это правда достаточно сложно прочитать
Markdown/Md.cs
Outdated
| return false; | ||
| try | ||
| { | ||
| return !(tagIndex == plainMd.Length - 1 && isOpenTag) |
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.
А можешь конъюнкты вынести в переменные? Скорее всего тут можно сделать так, чтобы это огромное условие читалось почти как предложение на английском языке
Markdown/Md.cs
Outdated
|
|
||
| public string Render() | ||
| { | ||
| TryParseToHtml(); |
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.
void-методы не очень хороший паттерн. От этого метода можно ожидать что он вернёт html
Markdown/Md.cs
Outdated
| { | ||
| if (plainMd[tagIndex] != '_') | ||
| return false; | ||
| try |
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.
чёт лучше try-catch наверное не использовать, а проверить tagIndex. try-catch очень сильно замедляет выполнение
fix bug in paragraphs
add trim p tag
No description provided.