text

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureMarkdown

func EnsureMarkdown(desc string) string

EnsureMarkdown prepends the <!--markdown--> prefix to enable markdown rendering in TargetProcess. Returns empty strings unchanged. Already-prefixed strings are returned as-is.

func PrepareFields

func PrepareFields(ctx context.Context, client *api.Client, fields map[string]any) error

PrepareFields processes text fields in a TP entity field map before submission. For Description fields, it resolves @mentions and prepends the markdown prefix.

Types

type UserResolver

type UserResolver struct {
	Client *api.Client
}

UserResolver resolves @mentions in text to TargetProcess user references.

func (*UserResolver) ResolveMentions

func (r *UserResolver) ResolveMentions(ctx context.Context, text string) (string, error)

ResolveMentions replaces @mentions in text with @user:login[Full Name] format. Unresolvable mentions are left unchanged.

Jump to

Keyboard shortcuts

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