Strip YAML frontmatter, code fences, inline code, and allowed-Swedish quoted/source-material sections from Markdown content. Returns the raw analytical prose body for language detection.
The prompt contract (see .github/prompts/04-analysis-pipeline.md and analysis/methodologies/per-artifact-methodologies.md) explicitly permits Swedish text in two narrow contexts:
Lines beginning with Source title: / Kรคlla: โ verbatim source titles. These ranges are stripped before density measurement so that a long Swedish source quote cannot fail the gate even when the analytical prose around it is fully English.
Strip YAML frontmatter, code fences, inline code, and allowed-Swedish quoted/source-material sections from Markdown content. Returns the raw analytical prose body for language detection.
The prompt contract (see
.github/prompts/04-analysis-pipeline.mdandanalysis/methodologies/per-artifact-methodologies.md) explicitly permits Swedish text in two narrow contexts:>) โ attributed source quotations.Source title:/Kรคlla:โ verbatim source titles. These ranges are stripped before density measurement so that a long Swedish source quote cannot fail the gate even when the analytical prose around it is fully English.