Documentation
¶
Overview ¶
Package slug lowercases and NFC-normalizes note slugs, rejects inputs that normalize to empty, and detects slug conflicts using the same canonical form.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidFrontmatterSlug reports an explicit frontmatter slug that normalizes to empty. ErrInvalidFrontmatterSlug = errors.New("frontmatter slug normalizes to empty") // ErrInvalidFileSlug reports a file stem that normalizes to empty. ErrInvalidFileSlug = errors.New("file stem normalizes to empty") )
Functions ¶
func Canonicalize ¶
Canonicalize returns the shared lowercase NFC form used by slug generation and note or alias lookup keys.
func DetectConflicts ¶
func DetectConflicts(candidates []Candidate) ([]Conflict, []InvalidSlug)
DetectConflicts returns stable lists of slug conflicts and invalid empty slugs.
Types ¶
type InvalidSlug ¶
InvalidSlug reports a source whose slug is empty or whitespace-only.
Click to show internal directories.
Click to hide internal directories.