loader: accept more RU variants of core-claim heading
This commit is contained in:
parent
301129403f
commit
8dc06deab9
1 changed files with 6 additions and 2 deletions
|
|
@ -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', " ");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue