* 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>
Этот коммит содержится в:
Harshil Sharma
2025-12-02 17:21:30 +01:00
коммит произвёл GitHub
родитель 183e6c4a07
Коммит b3d6c0c564
6 изменённых файлов: 131 добавлений и 60 удалений

Просмотреть файл

@@ -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 {