markdown

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package markdown implements a URL extractor for Markdown files. It supports various markdown link formats including inline links, reference links, images, autolinks, and HTML anchor tags. URLs inside code blocks are ignored.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractLinksFromContent

func ExtractLinksFromContent(content []byte, filePath string) ([]parser.Link, error)

ExtractLinksFromContent extracts links from markdown content.

Types

type Parser

type Parser struct{}

Parser implements parser.FileParser for markdown files.

func New

func New() *Parser

New creates a new markdown parser.

func (*Parser) Extensions

func (*Parser) Extensions() []string

Extensions returns the file extensions this parser handles.

func (*Parser) ValidateAndParse

func (*Parser) ValidateAndParse(filename string, content []byte) ([]parser.Link, error)

ValidateAndParse validates the content and extracts links in a single pass. For markdown, validation always passes (any text is valid markdown).

Jump to

Keyboard shortcuts

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