utils

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: MIT Imports: 9 Imported by: 3

Documentation

Overview

Package utils provides utility functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandPath

func ExpandPath(path string) string

ExpandPath expands tilde and all environment variables from the given path.

func GlamourStyle

func GlamourStyle(style string, isCode bool) glamour.TermRendererOption

GlamourStyle returns a glamour.TermRendererOption based on the given style.

func IsMarkdownFile

func IsMarkdownFile(filename string) bool

IsMarkdownFile returns whether the filename has a markdown extension.

func RemoveFrontmatter

func RemoveFrontmatter(content []byte) []byte

RemoveFrontmatter removes the front matter header of a markdown file.

func WrapCodeBlock

func WrapCodeBlock(s, language string) string

WrapCodeBlock wraps a string in a code block with the given language.

Types

This section is empty.

Jump to

Keyboard shortcuts

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