lint
This commit is contained in:
@@ -37,7 +37,8 @@ const discordLinkPattern = `https?://[^<\p{Zs}\x{feff}]*[^"'),.:;\]\p{Zs}\x{feff
|
||||
// don't contain < or whitespace anywhere, and don't end with "'),.:;]
|
||||
//
|
||||
// Zero-width whitespace is mostly in the Format category and is allowed, except \uFEFF isn't for some reason
|
||||
var discordLinkRegex = regexp.MustCompile(discordLinkPattern)
|
||||
// FIXME(skip): This will be unused until we port `escapeDiscordMarkdown`.
|
||||
// var discordLinkRegex = regexp.MustCompile(discordLinkPattern)
|
||||
var discordLinkRegexFull = regexp.MustCompile("^" + discordLinkPattern + "$")
|
||||
|
||||
func isActuallyLinkPreview(embed *discordgo.MessageEmbed) bool {
|
||||
|
||||
@@ -31,10 +31,11 @@ import (
|
||||
"github.com/yuin/goldmark/renderer"
|
||||
"github.com/yuin/goldmark/text"
|
||||
"github.com/yuin/goldmark/util"
|
||||
"go.mau.fi/mautrix-discord/pkg/discordid"
|
||||
"maunium.net/go/mautrix/bridgev2"
|
||||
"maunium.net/go/mautrix/bridgev2/networkid"
|
||||
"maunium.net/go/mautrix/id"
|
||||
|
||||
"go.mau.fi/mautrix-discord/pkg/discordid"
|
||||
)
|
||||
|
||||
type astDiscordTag struct {
|
||||
|
||||
@@ -26,12 +26,13 @@ import (
|
||||
|
||||
"github.com/bwmarrin/discordgo"
|
||||
"github.com/rs/zerolog"
|
||||
"go.mau.fi/mautrix-discord/pkg/attachment"
|
||||
"go.mau.fi/mautrix-discord/pkg/discordid"
|
||||
"maunium.net/go/mautrix/bridgev2"
|
||||
"maunium.net/go/mautrix/bridgev2/networkid"
|
||||
"maunium.net/go/mautrix/event"
|
||||
"maunium.net/go/mautrix/format"
|
||||
|
||||
"go.mau.fi/mautrix-discord/pkg/attachment"
|
||||
"go.mau.fi/mautrix-discord/pkg/discordid"
|
||||
)
|
||||
|
||||
func (mc *MessageConverter) ToMatrix(
|
||||
|
||||
@@ -19,8 +19,9 @@ package msgconv
|
||||
import (
|
||||
"context"
|
||||
|
||||
"go.mau.fi/mautrix-discord/pkg/attachment"
|
||||
"maunium.net/go/mautrix/bridgev2"
|
||||
|
||||
"go.mau.fi/mautrix-discord/pkg/attachment"
|
||||
)
|
||||
|
||||
type MessageConverter struct {
|
||||
|
||||
Reference in New Issue
Block a user