style

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Title of a note.
	RuleTitle = Rule("title")
	// Path to notebook file.
	RulePath = Rule("path")
	// Searched for term in a note.
	RuleTerm = Rule("term")
	// Element to emphasize, for example the short version of a prompt response: [y]es.
	RuleEmphasis = Rule("emphasis")
	// Element to understate, for example the content of the note in fzf.
	RuleUnderstate = Rule("understate")

	RuleBold          = Rule("bold")
	RuleItalic        = Rule("italic")
	RuleFaint         = Rule("faint")
	RuleUnderline     = Rule("underline")
	RuleStrikethrough = Rule("strikethrough")
	RuleBlink         = Rule("blink")
	RuleReverse       = Rule("reverse")
	RuleHidden        = Rule("hidden")

	RuleBlack   = Rule("black")
	RuleRed     = Rule("red")
	RuleGreen   = Rule("green")
	RuleYellow  = Rule("yellow")
	RuleBlue    = Rule("blue")
	RuleMagenta = Rule("magenta")
	RuleCyan    = Rule("cyan")
	RuleWhite   = Rule("white")

	RuleBlackBg   = Rule("black-bg")
	RuleRedBg     = Rule("red-bg")
	RuleGreenBg   = Rule("green-bg")
	RuleYellowBg  = Rule("yellow-bg")
	RuleBlueBg    = Rule("blue-bg")
	RuleMagentaBg = Rule("magenta-bg")
	RuleCyanBg    = Rule("cyan-bg")
	RuleWhiteBg   = Rule("white-bg")

	RuleBrightBlack   = Rule("bright-black")
	RuleBrightRed     = Rule("bright-red")
	RuleBrightGreen   = Rule("bright-green")
	RuleBrightYellow  = Rule("bright-yellow")
	RuleBrightBlue    = Rule("bright-blue")
	RuleBrightMagenta = Rule("bright-magenta")
	RuleBrightCyan    = Rule("bright-cyan")
	RuleBrightWhite   = Rule("bright-white")

	RuleBrightBlackBg   = Rule("bright-black-bg")
	RuleBrightRedBg     = Rule("bright-red-bg")
	RuleBrightGreenBg   = Rule("bright-green-bg")
	RuleBrightYellowBg  = Rule("bright-yellow-bg")
	RuleBrightBlueBg    = Rule("bright-blue-bg")
	RuleBrightMagentaBg = Rule("bright-magenta-bg")
	RuleBrightCyanBg    = Rule("bright-cyan-bg")
	RuleBrightWhiteBg   = Rule("bright-white-bg")
)

Predefined styling rules.

View Source
var NullStyler = nullStyler{}

NullStyler is a Styler with no styling rules.

Functions

This section is empty.

Types

type Rule

type Rule string

Rule is a key representing a single styling rule.

type Styler

type Styler interface {
	Style(text string, rules ...Rule) (string, error)
	MustStyle(text string, rules ...Rule) string
}

Styler stylizes text according to predefined styling rules.

A rule key can be either semantic, e.g. "title" or explicit, e.g. "red".

Jump to

Keyboard shortcuts

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