MCPcopy Create free account
hub / github.com/Noumena-Network/code / classifyPotentialDiagramLine

Function classifyPotentialDiagramLine

src/utils/markdown.ts:67–83  ·  view source on GitHub ↗
(
  line: string,
)

Source from the content-addressed store, hash-verified

65}
66
67function classifyPotentialDiagramLine(
68 line: string,
69): 'signal' | 'support' | 'other' {
70 if (line.trim().length === 0) {
71 return 'support'
72 }
73 if (
74 STRUCTURED_DIAGRAM_CHAR_RE.test(line) ||
75 STRUCTURED_DIAGRAM_BAR_RE.test(line)
76 ) {
77 return 'signal'
78 }
79 if (/^\s{4,}\S/.test(line)) {
80 return 'support'
81 }
82 return 'other'
83}
84
85function detectFenceDelimiter(
86 line: string,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected