tagextractor

package module
v0.0.0-...-17f6587 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2024 License: MIT Imports: 9 Imported by: 2

README

Tag Extractor

This Go module is used together with the GoActivityPub library to extract hash tags and mentions from values used as Natural Language Content.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PrefixToRemove []string = nil
	SuffixToRemove []string = nil
)
View Source
var IsValidTag = func(t vocab.Item) bool {
	return true
}
View Source
var ItemIsLocal = func(vocab.Item) bool {
	return true
}
View Source
var URLGenerator = func(it vocab.Item) vocab.Item {
	return nil
}

Functions

func FindAndReplace

func FindAndReplace(content vocab.Content) (vocab.Content, vocab.ItemCollection)

FindAndReplace finds all mention and tags strings in content and replaces them with HTML links

func FromContent

func FromContent(content vocab.Content) vocab.ItemCollection

FromContent parses content as a slice of bytes to find strings starting with the "#" and "@" markers and build them into an item collection

func TagNormalize

func TagNormalize(t string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL