MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / hasUnescapedMarker

Function hasUnescapedMarker

cli/src/utils/markdown-renderer.tsx:185–204  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

183}
184
185const hasUnescapedMarker = (value: string): boolean => {
186 if (!value) {
187 return false
188 }
189 const markers = ['**', '*']
190 return markers.some((marker) => {
191 let idx = value.indexOf(marker)
192 while (idx !== -1) {
193 let backslashes = 0
194 for (let offset = idx - 1; offset >= 0 && value[offset] === '\\'; offset -= 1) {
195 backslashes += 1
196 }
197 if (backslashes % 2 === 0) {
198 return true
199 }
200 idx = value.indexOf(marker, idx + marker.length)
201 }
202 return false
203 })
204}
205
206const findClosingDelimiter = (
207 value: string,

Callers 1

parseInlineFallbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected