commit 73c30ab11d291ece2e8153cade277db23d1990f5 from: Romain VINCENT date: Fri Jan 16 08:05:32 2026 UTC Fix tests by properly selecting chapters and chapters only (not child elements). commit - 328366910293466b36dbfcb39511b8b6bc273550 commit + 73c30ab11d291ece2e8153cade277db23d1990f5 blob - d015548f1560d9974dd899631dbba2f779260023 blob + a5f5ed0bd03ff1254e7252a4d64cbd58a135791a --- eur-lex-scraper/src/parsers/enacting_terms.rs +++ eur-lex-scraper/src/parsers/enacting_terms.rs @@ -32,7 +32,8 @@ impl From for EnactingTermParserEr impl EnactingTermParser { pub fn parse(element: ElementRef) -> Result { let mut enacting_terms = EnactingTerms::default(); - let chapter_selector = Selector::parse("[id^=cpt_]").unwrap(); + // Select only the root chapter + let chapter_selector = Selector::parse(r#"[id^="cpt_"]:not([id*="."])"#).unwrap(); let chapter_count = element.select(&chapter_selector).count(); if chapter_count > 0 { for chapter in element.select(&chapter_selector) {