withoutCodeFence

Unwraps one Markdown fence covering the whole reply, with an optional json tag. Prose around a fence, other language tags and multiple or nested fences remain unchanged, so a strict JSON parser can reject them. The content is not otherwise trimmed or validated.

Return

the single fence's content, or the original reply when it does not match

Parameters

raw

the complete model reply