MCPcopy Create free account
hub / github.com/diillson/chatcli / isFenceCloser

Function isFenceCloser

cli/cli_rendering.go:185–190  ·  view source on GitHub ↗

isFenceCloser reports whether a line closes a fence opened with the given token. A closer is the fence token at column 0 with only optional trailing whitespace after it.

(line, fence string)

Source from the content-addressed store, hash-verified

183// token. A closer is the fence token at column 0 with only optional trailing
184// whitespace after it.
185func isFenceCloser(line, fence string) bool {
186 if !strings.HasPrefix(line, fence) {
187 return false
188 }
189 return strings.TrimSpace(strings.TrimPrefix(line, fence)) == ""
190}
191
192// codeLanguageChip builds the themed language badge shown above a code block,
193// indented to align with glamour's 2-column code-block margin. The bar uses

Callers 1

splitTopLevelCodeBlocksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected