extract

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package extract extracts YAML frontmatter blocks from Markdown content.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractFrontmatter

func ExtractFrontmatter(content string) string

ExtractFrontmatter returns the YAML frontmatter block from content, including the delimiters and trailing newline.

Parameters:

  • content: Raw Markdown content potentially starting with frontmatter

Returns:

  • string: The frontmatter block including delimiters, or "" if not found

func StripFrontmatter

func StripFrontmatter(content string) string

StripFrontmatter removes the YAML frontmatter block from content, returning the remaining content. If no frontmatter is found, the original content is returned unchanged.

Parameters:

  • content: Raw Markdown content potentially starting with frontmatter

Returns:

  • string: Content without frontmatter

Types

This section is empty.

Jump to

Keyboard shortcuts

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