parser

package
v0.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package parser wraps goldmark to produce a parsed AST from GFM source.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	Node   ast.Node
	Source []byte
}

Document holds the root AST node and the original source bytes. The source bytes are required to resolve text segments stored in the AST.

func Parse

func Parse(src []byte) (*Document, error)

Parse parses GFM markdown source and returns a Document. It enables the GFM extension (tables, strikethrough, task lists, linkify) and sets the paragraph transformer so blank-line handling is correct.

Jump to

Keyboard shortcuts

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