summaryrefslogtreecommitdiff
path: root/internal/db/db.go
diff options
context:
space:
mode:
authorLibravatar Autumn! <86073772+autumnull@users.noreply.github.com>2023-02-03 10:58:58 +0000
committerLibravatar GitHub <noreply@github.com>2023-02-03 11:58:58 +0100
commit49beb17a8fbdbf3517c103a477a5459a3bba404d (patch)
tree364c82d4089c75d3b95a5d78fd31b33d91b30b59 /internal/db/db.go
parent[bugfix] Read Bookwyrm Articles more thoroughly (#1410) (diff)
downloadgotosocial-49beb17a8fbdbf3517c103a477a5459a3bba404d.tar.xz
[chore] Text formatting overhaul (#1406)
* Implement goldmark debug print for hashtags and mentions * Minify HTML in FromPlain * Convert plaintext status parser to goldmark * Move mention/tag/emoji finding logic into formatter * Combine mention and hashtag boundary characters * Normalize unicode when rendering hashtags
Diffstat (limited to 'internal/db/db.go')
-rw-r--r--internal/db/db.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/db/db.go b/internal/db/db.go
index aa1929da9..b66b21141 100644
--- a/internal/db/db.go
+++ b/internal/db/db.go
@@ -52,12 +52,12 @@ type DB interface {
USEFUL CONVERSION FUNCTIONS
*/
- // TagStringsToTags takes a slice of deduplicated, lowercase tags in the form "somehashtag", which have been
+ // TagStringToTag takes a lowercase tag in the form "somehashtag", which has been
// used in a status. It takes the id of the account that wrote the status, and the id of the status itself, and then
- // returns a slice of *apimodel.Tag corresponding to the given tags. If the tag already exists in database, that tag
+ // returns an *apimodel.Tag corresponding to the given tags. If the tag already exists in database, that tag
// will be returned. Otherwise a pointer to a new tag struct will be created and returned.
//
- // Note: this func doesn't/shouldn't do any manipulation of the tags in the DB, it's just for checking
+ // Note: this func doesn't/shouldn't do any manipulation of tags in the DB, it's just for checking
// if they exist in the db already, and conveniently returning them, or creating new tag structs.
- TagStringsToTags(ctx context.Context, tags []string, originAccountID string) ([]*gtsmodel.Tag, error)
+ TagStringToTag(ctx context.Context, tag string, originAccountID string) (*gtsmodel.Tag, error)
}