File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
mkdocs_embed_file_plugins Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -30,26 +30,29 @@ def search_in_file(citation_part: str, contents: str):
30
30
elif '#' in citation_part and not '^' in citation_part :
31
31
# cite from title
32
32
sub_section = []
33
- citation_part = citation_part .replace ('-' , ' ' ).replace ('#' , '# ' )
33
+ citation_part = citation_part .replace ('-' , ' ' ).replace ('#' , '# ' ). upper ()
34
34
heading = 0
35
35
for i in data :
36
- if citation_part in i and i .startswith ('#' ):
36
+ if citation_part in i . upper () and i .startswith ('#' ):
37
37
heading = i .count ('#' ) * (- 1 )
38
38
sub_section .append ([i ])
39
39
elif heading != 0 :
40
40
inverse = i .count ('#' ) * (- 1 )
41
41
if inverse == 0 or heading > inverse :
42
+ print ('Inverse ?' , i )
42
43
sub_section .append ([i ])
43
44
elif inverse >= heading :
45
+ print ('Break ?' )
44
46
break
45
47
sub_section = [x for y in sub_section for x in y ]
48
+
46
49
sub_section = '\n ' .join (sub_section )
47
50
return sub_section
48
51
elif '#^' in citation_part :
49
52
# cite from block
50
53
citation_part = citation_part .replace ('#' , '' )
51
54
for i in data :
52
- if citation_part in i :
55
+ if citation_part in i . upper () :
53
56
return i .replace (citation_part , '' )
54
57
return []
55
58
You can’t perform that action at this time.
0 commit comments