mirror of
https://github.com/mattermost/focalboard.git
synced 2024-12-24 13:43:12 +02:00
minimum changes required (#1763)
This commit is contained in:
parent
f74eea11ba
commit
520f1e65e7
@ -292,9 +292,8 @@ func postWithBoardsEmbed(post *mmModel.Post, showBoardsUnfurl bool) *mmModel.Pos
|
||||
|
||||
// Trim away the first / because otherwise after we split the string, the first element in the array is a empty element
|
||||
urlPath := u.Path
|
||||
if strings.HasPrefix(urlPath, "/") {
|
||||
urlPath = u.Path[1:]
|
||||
}
|
||||
urlPath = strings.TrimPrefix(urlPath, "/")
|
||||
urlPath = strings.TrimSuffix(urlPath, "/")
|
||||
pathSplit := strings.Split(strings.ToLower(urlPath), "/")
|
||||
queryParams := u.Query()
|
||||
|
||||
@ -337,6 +336,13 @@ func getFirstLink(str string) string {
|
||||
if _, ok := blockOrInline.(*markdown.Autolink); ok {
|
||||
if link := blockOrInline.(*markdown.Autolink).Destination(); firstLink == "" {
|
||||
firstLink = link
|
||||
return false
|
||||
}
|
||||
}
|
||||
if inlineLink, ok := blockOrInline.(*markdown.InlineLink); ok {
|
||||
if link := inlineLink.Destination(); firstLink == "" {
|
||||
firstLink = link
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user