MCPcopy
hub / github.com/kopia/kopia / escapeFlags

Function escapeFlags

tools/cli2md/cli2md.go:39–41  ·  view source on GitHub ↗

escapeFlags escapes command-line flag references in help text by wrapping them in backticks.

(text string)

Source from the content-addressed store, hash-verified

37
38// escapeFlags escapes command-line flag references in help text by wrapping them in backticks.
39func escapeFlags(text string) string {
40 return escapeFlagsRe.ReplaceAllString(text, "$1`$2`")
41}
42
43//nolint:gochecknoglobals
44var overrideDefault = map[string]string{

Callers 4

emitFlagsFunction · 0.85
emitArgsFunction · 0.85
generateSubcommandPageFunction · 0.85
TestEscapeFlagsFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestEscapeFlagsFunction · 0.68