autolink

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Autolink struct {
	Name                 string   `json:"Name"`
	Disabled             bool     `json:"Disabled"`
	Pattern              string   `json:"Pattern"`
	Template             string   `json:"Template"`
	Scope                []string `json:"Scope"`
	WordMatch            bool     `json:"WordMatch"`
	DisableNonWordPrefix bool     `json:"DisableNonWordPrefix"`
	DisableNonWordSuffix bool     `json:"DisableNonWordSuffix"`
	ProcessBotPosts      bool     `json:"ProcessBotPosts"`
	// contains filtered or unexported fields
}

Autolink represents a pattern to autolink.

func (*Autolink) Compile

func (l *Autolink) Compile() error

Compile compiles the link's regular expression

func (Autolink) DisplayName

func (l Autolink) DisplayName() string

DisplayName returns a display name for the link.

func (Autolink) Equals

func (l Autolink) Equals(x Autolink) bool

func (Autolink) Replace

func (l Autolink) Replace(message string) string

Replace will subsitute the regex's with the supplied links

func (Autolink) ToMarkdown

func (l Autolink) ToMarkdown(i int) string

ToMarkdown prints a Link as a markdown list element

Jump to

Keyboard shortcuts

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