[chore/bugfix] Deinterface text.Formatter, allow underscores in hashtags (#2233)

This commit is contained in:
tobi
2023-09-29 10:39:56 +02:00
committed by GitHub
parent b6b8f82c87
commit 536d9e482d
18 changed files with 1040 additions and 713 deletions

View File

@@ -41,7 +41,7 @@ type Processor struct {
mediaManager *media.Manager
oauthServer oauth.Server
filter *visibility.Filter
formatter text.Formatter
formatter *text.Formatter
federator federation.Federator
parseMention gtsmodel.ParseMentionFunc
}

View File

@@ -277,7 +277,7 @@ func processLanguage(ctx context.Context, form *apimodel.AdvancedStatusCreateFor
return nil
}
func processContent(ctx context.Context, dbService db.DB, formatter text.Formatter, parseMention gtsmodel.ParseMentionFunc, form *apimodel.AdvancedStatusCreateForm, accountID string, status *gtsmodel.Status) error {
func processContent(ctx context.Context, dbService db.DB, formatter *text.Formatter, parseMention gtsmodel.ParseMentionFunc, form *apimodel.AdvancedStatusCreateForm, accountID string, status *gtsmodel.Status) error {
// if there's nothing in the status at all we can just return early
if form.Status == "" {
status.Content = ""

View File

@@ -31,7 +31,7 @@ type Processor struct {
federator federation.Federator
converter *typeutils.Converter
filter *visibility.Filter
formatter text.Formatter
formatter *text.Formatter
parseMention gtsmodel.ParseMentionFunc
}