markdown

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Highlight

func Highlight(code, lang string) string

func Render

func Render(input string) string

func RenderThinking

func RenderThinking(text string) string

Types

type Segment

type Segment struct {
	Type     SegmentType
	Content  string
	Language string
	Level    int
	Alt      string
	URL      string
	Number   int
}

func Parse

func Parse(input string) []Segment

type SegmentType

type SegmentType int
const (
	SegmentText SegmentType = iota
	SegmentHeader
	SegmentBold
	SegmentItalic
	SegmentCodeBlock
	SegmentInlineCode
	SegmentListItem
	SegmentNumberedItem
	SegmentBlockquote
	SegmentLink
	SegmentCodeBlockStart
	SegmentCodeBlockEnd
	SegmentHorizontalRule
)

type Token

type Token struct {
	Type  TokenType
	Value string
}

type TokenType

type TokenType int
const (
	TokenKeyword TokenType = iota
	TokenString
	TokenComment
	TokenNumber
	TokenUserType
	TokenFunction
	TokenOperator
	TokenPlain
)

Jump to

Keyboard shortcuts

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