MCPcopy
hub / github.com/witheve/Eve / inCodeBlock

Method inCodeBlock

src/ide.ts:1203–1212  ·  view source on GitHub ↗
(pos:Position)

Source from the content-addressed store, hash-verified

1201 //-------------------------------------------------------
1202
1203 inCodeBlock(pos:Position) {
1204 let inCodeBlock = false;
1205 for(let span of this.getAllSpans("code_block")) {
1206 let loc = span.find();
1207 if(!loc) continue;
1208 if(loc.from.line <= pos.line && comparePositions(loc.to, pos) > 0) {
1209 return true;
1210 }
1211 }
1212 }
1213
1214 /** Create a new span representing the given source, collapsing and splitting existing spans as required to maintain invariants. */
1215 formatSpan(from:Position, to:Position, source:any):Span[] {

Callers 3

EditorClass · 0.95
applyMethod · 0.80
applyMethod · 0.80

Calls 3

getAllSpansMethod · 0.95
comparePositionsFunction · 0.90
findMethod · 0.65

Tested by

no test coverage detected