mdline

package
v0.53.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package mdline reads the `key: value` lines f10 takes out of markdown that people and agents edit. The model reads `**local**: ...` and `local: ...` alike, so every Go reader goes through here to read them alike too.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bare

func Bare(s string) string

Bare trims marks and space from both ends: `**FT-12**` is FT-12.

func Cut

func Cut(line string, seps ...string) (string, string, bool)

Cut splits a line at the earliest of seps into key, value and whether a non-empty key was found. The key loses its marks; the value keeps its code spans (some carry an identity in one), losing only a marked key's leftover emphasis; a bold label cuts after its closing `**` even with no separator.

func Item

func Item(line string) (string, bool)

Item strips a list bullet ("- ", "* ", "+ ") and the space around the line; ok is false when the line is not a list item.

func Prose added in v0.44.0

func Prose(s string) string

Prose drops fenced blocks and inline code spans, each leaving a space, for a phrase that must come from the prose and not from a command or a name quoted in code. A backtick with no closing one on its line stays.

func Unmark

func Unmark(s string) string

Unmark drops every emphasis star and code mark, for a phrase matched inside a paragraph rather than at the start of a line.

Types

This section is empty.

Jump to

Keyboard shortcuts

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