MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / peekLine

Method peekLine

src/common/markdown-block.ts:282–291  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

280 }
281
282 peekLine(): string {
283 const currentPos = this.pos;
284 let line = '';
285 while (!this.atEnd() && this.peek() !== '\n') {
286 line += this.consume();
287 }
288 // Reset position
289 this.pos = currentPos;
290 return line;
291 }
292
293 isDigit(char: string): boolean {
294 return /\d/.test(char);

Callers 3

parseTableMethod · 0.95
parseParagraphMethod · 0.95
skipEmptyLinesMethod · 0.95

Calls 3

consumeMethod · 0.80
atEndMethod · 0.45
peekMethod · 0.45

Tested by

no test coverage detected