* perf: apply perfpsrint linter (#33967) * perf: apply perfpsrint linter * further simplifications * improved TestParseHashtags coverage * more simplifications * simplify renderBlockHTML further --------- Co-authored-by: Jesse Hallam <jesse@mattermost.com> * Fixed a bad merge --------- Co-authored-by: Catena cyber <35799796+catenacyber@users.noreply.github.com> Co-authored-by: Jesse Hallam <jesse@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
183e6c4a07
Коммит
b3d6c0c564
@@ -19,11 +19,12 @@ type IndentedCode struct {
|
||||
RawCode []IndentedCodeLine
|
||||
}
|
||||
|
||||
func (b *IndentedCode) Code() (result string) {
|
||||
func (b *IndentedCode) Code() string {
|
||||
var resultSb strings.Builder
|
||||
for _, code := range b.RawCode {
|
||||
result += strings.Repeat(" ", code.Indentation) + b.markdown[code.Range.Position:code.Range.End]
|
||||
resultSb.WriteString(strings.Repeat(" ", code.Indentation) + b.markdown[code.Range.Position:code.Range.End])
|
||||
}
|
||||
return
|
||||
return resultSb.String()
|
||||
}
|
||||
|
||||
func (b *IndentedCode) Continuation(indentation int, r Range) *continuation {
|
||||
|
||||
Ссылка в новой задаче
Block a user