markdown

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiffResult

type DiffResult struct {
	PrettyDiff string
	HasDiff    bool
}

type Doc

type Doc struct {
	// contains filtered or unexported fields
}

func NewDoc

func NewDoc(name string) (*Doc, error)

func NewDocOrCreate added in v0.5.0

func NewDocOrCreate(name string) (*Doc, error)

NewDocOrCreate creates a new Doc from an existing file, or creates a new file with template content if it doesn't exist

func NewEmptyDoc added in v0.5.0

func NewEmptyDoc(name string) *Doc

NewEmptyDoc creates an empty Doc with just the name (used for comparing against non-existent files)

func (*Doc) Copy

func (d *Doc) Copy() Doc

func (*Doc) Diff

func (d *Doc) Diff(doc *Doc) DiffResult

func (*Doc) Equals added in v0.2.0

func (d *Doc) Equals(doc Doc) bool

func (*Doc) GetName added in v0.2.0

func (d *Doc) GetName() string

func (*Doc) IsInsideCodeBlock added in v0.7.0

func (d *Doc) IsInsideCodeBlock(lineIndex int) bool

IsInsideCodeBlock checks if the line at the given index is inside a markdown code block

func (*Doc) ToString

func (d *Doc) ToString() string

func (*Doc) Update

func (d *Doc) Update(a *action.Action) error

func (*Doc) UpdateUsage

func (d *Doc) UpdateUsage(a *action.Action) error

func (*Doc) WriteToFile

func (d *Doc) WriteToFile() error

Jump to

Keyboard shortcuts

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