diff --git a/.golangci.yml b/.golangci.yml index e7b9bed24d..824bf57e43 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -59,7 +59,7 @@ issues: - linters: - misspell - path: "utils/markdown/html_entities.go" + path: "shared/markdown/html_entities.go" - linters: - unparam diff --git a/app/notification.go b/app/notification.go index cdf55a18da..6fdae2c8c7 100644 --- a/app/notification.go +++ b/app/notification.go @@ -15,9 +15,9 @@ import ( "github.com/mattermost/mattermost-server/v5/model" "github.com/mattermost/mattermost-server/v5/shared/i18n" + "github.com/mattermost/mattermost-server/v5/shared/markdown" "github.com/mattermost/mattermost-server/v5/shared/mlog" "github.com/mattermost/mattermost-server/v5/store" - "github.com/mattermost/mattermost-server/v5/utils/markdown" ) func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *model.Channel, sender *model.User, parentPostList *model.PostList, setOnline bool) ([]string, error) { diff --git a/app/post_metadata.go b/app/post_metadata.go index 3909a4c620..bd6384d9d4 100644 --- a/app/post_metadata.go +++ b/app/post_metadata.go @@ -18,9 +18,9 @@ import ( "github.com/mattermost/mattermost-server/v5/model" "github.com/mattermost/mattermost-server/v5/services/cache" + "github.com/mattermost/mattermost-server/v5/shared/markdown" "github.com/mattermost/mattermost-server/v5/shared/mlog" "github.com/mattermost/mattermost-server/v5/utils/imgutils" - "github.com/mattermost/mattermost-server/v5/utils/markdown" ) type linkMetadataCache struct { diff --git a/model/post.go b/model/post.go index 3e31ab246e..4fc4a15598 100644 --- a/model/post.go +++ b/model/post.go @@ -14,7 +14,7 @@ import ( "sync" "unicode/utf8" - "github.com/mattermost/mattermost-server/v5/utils/markdown" + "github.com/mattermost/mattermost-server/v5/shared/markdown" ) const ( diff --git a/utils/markdown/autolink.go b/shared/markdown/autolink.go similarity index 100% rename from utils/markdown/autolink.go rename to shared/markdown/autolink.go diff --git a/utils/markdown/autolink_test.go b/shared/markdown/autolink_test.go similarity index 100% rename from utils/markdown/autolink_test.go rename to shared/markdown/autolink_test.go diff --git a/utils/markdown/block_quote.go b/shared/markdown/block_quote.go similarity index 100% rename from utils/markdown/block_quote.go rename to shared/markdown/block_quote.go diff --git a/utils/markdown/blocks.go b/shared/markdown/blocks.go similarity index 100% rename from utils/markdown/blocks.go rename to shared/markdown/blocks.go diff --git a/utils/markdown/commonmark_test.go b/shared/markdown/commonmark_test.go similarity index 100% rename from utils/markdown/commonmark_test.go rename to shared/markdown/commonmark_test.go diff --git a/utils/markdown/document.go b/shared/markdown/document.go similarity index 100% rename from utils/markdown/document.go rename to shared/markdown/document.go diff --git a/utils/markdown/fenced_code.go b/shared/markdown/fenced_code.go similarity index 100% rename from utils/markdown/fenced_code.go rename to shared/markdown/fenced_code.go diff --git a/utils/markdown/html.go b/shared/markdown/html.go similarity index 100% rename from utils/markdown/html.go rename to shared/markdown/html.go diff --git a/utils/markdown/html_entities.go b/shared/markdown/html_entities.go similarity index 100% rename from utils/markdown/html_entities.go rename to shared/markdown/html_entities.go diff --git a/utils/markdown/indented_code.go b/shared/markdown/indented_code.go similarity index 100% rename from utils/markdown/indented_code.go rename to shared/markdown/indented_code.go diff --git a/utils/markdown/inlines.go b/shared/markdown/inlines.go similarity index 100% rename from utils/markdown/inlines.go rename to shared/markdown/inlines.go diff --git a/utils/markdown/inspect.go b/shared/markdown/inspect.go similarity index 100% rename from utils/markdown/inspect.go rename to shared/markdown/inspect.go diff --git a/utils/markdown/inspect_test.go b/shared/markdown/inspect_test.go similarity index 100% rename from utils/markdown/inspect_test.go rename to shared/markdown/inspect_test.go diff --git a/utils/markdown/lines.go b/shared/markdown/lines.go similarity index 100% rename from utils/markdown/lines.go rename to shared/markdown/lines.go diff --git a/utils/markdown/lines_test.go b/shared/markdown/lines_test.go similarity index 100% rename from utils/markdown/lines_test.go rename to shared/markdown/lines_test.go diff --git a/utils/markdown/links.go b/shared/markdown/links.go similarity index 100% rename from utils/markdown/links.go rename to shared/markdown/links.go diff --git a/utils/markdown/links_test.go b/shared/markdown/links_test.go similarity index 100% rename from utils/markdown/links_test.go rename to shared/markdown/links_test.go diff --git a/utils/markdown/list.go b/shared/markdown/list.go similarity index 100% rename from utils/markdown/list.go rename to shared/markdown/list.go diff --git a/utils/markdown/markdown.go b/shared/markdown/markdown.go similarity index 100% rename from utils/markdown/markdown.go rename to shared/markdown/markdown.go diff --git a/utils/markdown/paragraph.go b/shared/markdown/paragraph.go similarity index 100% rename from utils/markdown/paragraph.go rename to shared/markdown/paragraph.go diff --git a/utils/markdown/reference_definition.go b/shared/markdown/reference_definition.go similarity index 100% rename from utils/markdown/reference_definition.go rename to shared/markdown/reference_definition.go diff --git a/utils/markdown/text_range_test.go b/shared/markdown/text_range_test.go similarity index 100% rename from utils/markdown/text_range_test.go rename to shared/markdown/text_range_test.go