*/
export function isInsideCodeContext(text: string): boolean {
let inFencedBlock = false;
let fenceChar = '';
let fenceLength = 0;
const unfencedLines: string[] = [];
for (const line of lines) {
const trimmed = line.trimStart();
if (inFencedBlock) {
// Check for closing fence: same char, at least same length, only whitespace after
const closeLength = countLeadingChar(trimmed, fenceChar);