Something went wrong. Try again.
fork of prime agent with changes i want but are not upstreamable probqbly (and some fixes)
Something went wrong. Try again.
372 B · 13 lines
TypeScript
at main
1234567891011121314const BASH_CELL_MAGIC_PATTERN = /^(?:[ \t]*\r?\n)*[ \t]*%%bash\b[^\r\n]*(?:\r?\n|$)/;
export interface ParsedIpythonBashCell { body: string;}
export function parseIpythonBashCell(code: string): ParsedIpythonBashCell | undefined { const match = BASH_CELL_MAGIC_PATTERN.exec(code); if (!match) { return undefined; } return { body: code.slice(match[0].length) };}