From d5a7a3738a3dc1895727238b1bd96bdcf844e04d Mon Sep 17 00:00:00 2001 From: VojtechStep Date: Tue, 24 Oct 2023 21:03:17 +0200 Subject: [PATCH] pre-commit --- scripts/preprocessor_concepts.py | 6 ++++++ src/graph-theory/circuits-undirected-graphs.lagda.md | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/preprocessor_concepts.py b/scripts/preprocessor_concepts.py index 984ae1064e..e6b45c55b5 100644 --- a/scripts/preprocessor_concepts.py +++ b/scripts/preprocessor_concepts.py @@ -16,9 +16,11 @@ LINK_REGEX = re.compile( r'\[(.*?)\]\(.*\)') + def does_support(backend): return backend == 'html' + def sub_match_for_concept(m, mut_index, path): wikidata_id = m.group(1) text = m.group(2) @@ -35,12 +37,14 @@ def sub_match_for_concept(m, mut_index, path): mut_index.append(index_entry) return f'{anchor}{text}' + def tag_concepts_chapter_rec_mut(chapter, config, mut_index): chapter['content'] = CONCEPT_REGEX.sub( lambda m: sub_match_for_concept(m, mut_index, chapter['path']), chapter['content']) tag_concepts_sections_rec_mut(chapter['sub_items'], config, mut_index) + def tag_concepts_sections_rec_mut(sections, config, mut_index): for section in sections: chapter = section.get('Chapter') @@ -49,6 +53,7 @@ def tag_concepts_sections_rec_mut(sections, config, mut_index): tag_concepts_chapter_rec_mut(chapter, config, mut_index) + def tag_concepts_root_section(section, config, mut_index): chapter = section.get('Chapter') if chapter is not None: @@ -56,6 +61,7 @@ def tag_concepts_root_section(section, config, mut_index): return section + if __name__ == '__main__': if len(sys.argv) > 1: arguments = sys.argv[1:] diff --git a/src/graph-theory/circuits-undirected-graphs.lagda.md b/src/graph-theory/circuits-undirected-graphs.lagda.md index 961d9fc54a..1941ff52e9 100644 --- a/src/graph-theory/circuits-undirected-graphs.lagda.md +++ b/src/graph-theory/circuits-undirected-graphs.lagda.md @@ -21,8 +21,9 @@ open import graph-theory.undirected-graphs ## Idea -A {{#concept WD=Q245595 "circuit"}} in an [undirected graph](graph-theory.undirected-graphs.md) -`G` consists of a [`k`-gon](graph-theory.polygons.md) `H` equipped with a +A {{#concept WD=Q245595 "circuit"}} in an +[undirected graph](graph-theory.undirected-graphs.md) `G` consists of a +[`k`-gon](graph-theory.polygons.md) `H` equipped with a [totally faithful](graph-theory.totally-faithful-morphisms-undirected-graphs.md) [morphism](graph-theory.morphisms-undirected-graphs.md) of undirected graphs from `H` to `G`. In other words, a circuit is a closed walk with no repeated