Documentation
¶
Overview ¶
Package text groups the tools that work on plain text.
Index ¶
Constants ¶
const ( LangUnified = "diff" LangSide = "diff-side" )
Result.Lang values the TUI uses to colour the output.
Variables ¶
This section is empty.
Functions ¶
func IdentWords ¶ added in v1.0.0
IdentWords splits identifiers and phrases into words: at any character that is not a letter or a digit, at lower→upper (fooBar), before the last capital of an acronym (HTTPServer → HTTP Server) and, with splitDigits, between letters and digits (v2 → v 2).
Types ¶
type Case ¶ added in v0.2.0
type Case struct{}
Case converts each line between naming styles (camelCase, snake_case…) and text cases (Title, Sentence…).
type Inspect ¶ added in v0.2.0
type Inspect struct{}
Inspect counts characters, words and lines, and sorts, deduplicates or reverses lines.
type Markdown ¶ added in v1.0.0
type Markdown struct{}
Markdown previews Markdown. Run only passes the text through with Lang "markdown": render draws it with Glamour at the panel's width, in the run goroutine, like any other colouring. Without colour (pipes, NO_COLOR) the output is the source.