File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ def validate_headers(path: Path) -> None:
20
20
21
21
title_count = 0
22
22
admonition_count = 0
23
+ admonition_is_note = False
23
24
headings_count = dict .fromkeys (HEADINGS , 0 )
24
25
for cell in notebook .cells :
25
26
if cell ["cell_type" ] != "markdown" :
@@ -32,6 +33,9 @@ def validate_headers(path: Path) -> None:
32
33
title_count += 1
33
34
elif line == f"```{{admonition}} { ADMONITION_TITLE } " :
34
35
admonition_count += 1
36
+ elif admonition_count and not admonition_is_note :
37
+ admonition_is_note = line .startswith (":class: note" )
38
+ assert admonition_is_note , f"{ path = !s} : The admonition is not a note"
35
39
36
40
if not path .name .startswith ("template" ):
37
41
assert title_count , f"{ path = !s} : The first line is not a title."
You can’t perform that action at this time.
0 commit comments