inline

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorInvalidCommand                       = errors.New("invalid command")
	ErrorInvalidArgs                          = errors.New("invalid arguments for command")
	ErrorInvalidArgsNumber                    = errors.New("invalid number of arguments for command")
	ErrorInvalidArgsMissingOpeningParantheses = errors.New("missing opening paranthesis for argument list")
	ErrorInvalidArgsMissingClosingParantheses = errors.New("missing closing paranthesis for argument list")
	ErrorInvalidArgsMissingArguments          = errors.New("must provide at least one argument")
	ErrorInvalidArgsMissingSpecFile           = errors.New("file path not found")
	ErrorInvalidArgsRFCNumber                 = errors.New("RFC number must be a positive integer")
	ErrorInvalidArgsURL                       = errors.New("invalid URL format")
)

Functions

func FindReferences

func FindReferences(document string) ([]InlineReference, []InlineError)

Types

type InlineCommand

type InlineCommand string
const (
	File    InlineCommand = "file"
	RFC     InlineCommand = "rfc"
	URL     InlineCommand = "url"
	Invalid InlineCommand = "invalid"
)

type InlineError

type InlineError struct {
	Err          error
	LineNumber   int
	ColumnNumber int
	Line         string
}

func (InlineError) Error

func (e InlineError) Error() string

func (InlineError) Format

func (e InlineError) Format() string

type InlineReference

type InlineReference struct {
	// The command used
	Command InlineCommand
	// Arguments passed to the command
	Args []string
	// Line number where the reference was found
	LineNumber int
}

Jump to

Keyboard shortcuts

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