wikilink

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2025 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package wikilinks provides functionality for parsing and processing WikiLinks in markdown content.

Index

Constants

This section is empty.

Variables

View Source
var (
	// WikiLinkRegex matches WikiLinks in the format [[link-target]] or [[link-target|link-text]].
	WikiLinkRegex = regexp.MustCompile(`\[\[([^|\]]+)(?:\|([^\]]+))?\]\]`)
)

Functions

This section is empty.

Types

type Link struct {
	Target      string `json:"target"`
	DisplayText string `json:"display_text"`
	Original    string `json:"original"`
}

Link represents a WikiLink with its target and optional display text.

func ParseLinks(content string) []Link

ParseLinks extracts all WikiLinks from the given markdown content.

Jump to

Keyboard shortcuts

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