tasktitle

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package tasktitle is tracker.title: the template a task's title is written through on the tracker, and the strip that takes a leading id back off so f10's own output never shows it twice.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Template

type Template string

Template is a declared tracker.title; the zero value changes nothing.

func Parse

func Parse(raw string) (Template, error)

Parse refuses a template without exactly one {title} and a placeholder other than {id}, {n} and {title}.

func (Template) Applied

func (t Template) Applied(title, id, n string) bool

Applied reports whether title is already written through the template, whatever its shape, so a retitle leaves it alone.

func (Template) Render

func (t Template) Render(id, n, title string) string

Render is title written through the template for the task id and its number n. A title holding a placeholder's text is not substituted again.

func (Template) Strip

func (t Template) Strip(title, id, n string) string

Strip takes a leading id and the punctuation after it off title, only when the template opens with {id}, {n} or #{n}: an id inside a title is never a prefix f10 wrote. A title that is the id alone stays whole.

Jump to

Keyboard shortcuts

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