loader: accept more RU variants of core-claim heading

This commit is contained in:
Alexey 2026-04-24 22:35:14 +05:00
parent 301129403f
commit 8dc06deab9

View file

@ -235,11 +235,15 @@ fn parse_source(path: &Path, cycle_slug: &str) -> Result<Source> {
.map(|l| l.trim_start_matches("# ").trim().to_string())
.unwrap_or_else(|| slug.clone());
// Try known heading variants: EN original + RU translation batch
// used «Ключевое утверждение».
// Try known heading variants — RU translation batch used several
// different renderings of "Core claim" across files.
let core_claim = extract_section(&body_md, "## Core claim")
.or_else(|| extract_section(&body_md, "## Ключевое утверждение"))
.or_else(|| extract_section(&body_md, "## Основное утверждение"))
.or_else(|| extract_section(&body_md, "## Ключевой тезис"))
.or_else(|| extract_section(&body_md, "## Основной тезис"))
.or_else(|| extract_section(&body_md, "## Главное утверждение"))
.or_else(|| extract_section(&body_md, "## Главный тезис"))
.unwrap_or_default()
.trim()
.replace('\n', " ");