astsrc

package
v0.4.3-final-apache Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2025 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 ASTSource

type ASTSource []byte

ASTSource holds the source of the markdown AST (a read-only byte slice).

func (*ASTSource) Append

func (s *ASTSource) Append(data []byte) text.Segment

Append appends bytes to the source and returns corresponding segment.

func (*ASTSource) AppendMultiple

func (s *ASTSource) AppendMultiple(data [][]byte) *text.Segments

AppendMultiple appends multiple byte slices to the source and returns corresponding segments.

func (*ASTSource) AppendString

func (s *ASTSource) AppendString(data string) text.Segment

AppendString appends a string to the source and returns corresponding segment.

func (*ASTSource) Appendf

func (s *ASTSource) Appendf(format string, args ...interface{}) text.Segment

Appendf appends formatted string to the source and returns corresponding segment.

func (ASTSource) AsBytes

func (s ASTSource) AsBytes() []byte

AsBytes returns the source as a byte slice. Returned bytes should be treated as read-only or modified with care, ensuring that the offsets are not changed.

Jump to

Keyboard shortcuts

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