Documentation
¶
Overview ¶
Package prosegate enforces punctuation restraint across a project's tracked text files. It rejects en dashes and paragraphs containing three or more em dashes while permitting ellipses and curly quotes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseCodepoint ¶
ParseCodepoint turns a "U+2014" spelling into its rune. It accepts the five formerly guarded codepoints so existing adopter exemptions remain compatible.
Types ¶
type Exemption ¶
Exemption permits a guarded codepoint in a path, optionally pinning its whole-file occurrence count.
type Finding ¶
Finding is one punctuation-restraint violation. Paragraph is nonzero for an em-dash threshold violation and identifies the blank-line-delimited text block within the file. Pinned is non-nil for an exemption count mismatch.
type ViolationCounts ¶ added in v0.40.0
ViolationCounts is the comparable policy measure used by the historical advisory: all en dashes plus em dashes beyond the allowance of two in each paragraph.
func CountViolations ¶ added in v0.40.0
func CountViolations(text string) ViolationCounts
CountViolations measures the guarded punctuation in text. A whitespace-only line is blank, CRLF and LF delimit paragraphs identically, and empty blocks between consecutive blank lines are ignored.