mdline

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package mdline reads the `key: value` lines f10 takes out of markdown that people and agents edit: project.md's facts and a task body's After: line. 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. The key comes back without marks; the value keeps its code spans, since some values carry an identity in one, and loses only the emphasis a marked key left behind (`**local:** ...`). A bold label cuts after its closing `**` even with no separator (`**Reviewer** bot ...`). It returns the key, the value, and whether a non-empty key was found.

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 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