From 56e7bd01ca09ad52b0c4f48f146a20a4f1b78696 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 5 Aug 2023 20:43:19 +0200 Subject: Update dependencies and remove old matterclient lib (#2067) --- .../mattermost-server/v5/shared/markdown/lines.go | 32 ---------------------- 1 file changed, 32 deletions(-) delete mode 100644 vendor/github.com/mattermost/mattermost-server/v5/shared/markdown/lines.go (limited to 'vendor/github.com/mattermost/mattermost-server/v5/shared/markdown/lines.go') diff --git a/vendor/github.com/mattermost/mattermost-server/v5/shared/markdown/lines.go b/vendor/github.com/mattermost/mattermost-server/v5/shared/markdown/lines.go deleted file mode 100644 index f59e5afe..00000000 --- a/vendor/github.com/mattermost/mattermost-server/v5/shared/markdown/lines.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See LICENSE.txt for license information. - -package markdown - -import ( - "strings" -) - -type Line struct { - Range -} - -func ParseLines(markdown string) []Line { - lineStartPosition := 0 - isAfterCarriageReturn := false - lines := make([]Line, 0, strings.Count(markdown, "\n")) - for position, r := range markdown { - if r == '\n' { - lines = append(lines, Line{Range{lineStartPosition, position + 1}}) - lineStartPosition = position + 1 - } else if isAfterCarriageReturn { - lines = append(lines, Line{Range{lineStartPosition, position}}) - lineStartPosition = position - } - isAfterCarriageReturn = r == '\r' - } - if lineStartPosition < len(markdown) { - lines = append(lines, Line{Range{lineStartPosition, len(markdown)}}) - } - return lines -} -- cgit v1.2.3