strip_json_fence
strip_json_fence
Unwrap ```json ... ``` fencing. The chat engine hands the model’s answer back verbatim,
fence and all, where the voice engine parses it first. Text without a fence is returned trimmed.
Parameters
text
The raw string, fenced or not.
Returns
str — The content with any opening and closing fence removed and whitespace trimmed.
Example
Part of the post-prompt normalization module.