File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
mkdocs_embed_file_plugins Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ def search_in_file(citation_part: str, contents: str) -> str:
27
27
data = contents .split ('\n ' )
28
28
if '#' not in citation_part :
29
29
# All text citation
30
- return re .sub (r'\^\w+$' , '' , contents )
30
+ return re .sub (r'\[?\ ^\w+$' , '' , contents )
31
31
elif '#' in citation_part and not '^' in citation_part :
32
32
# cite from title
33
33
sub_section = []
@@ -45,7 +45,7 @@ def search_in_file(citation_part: str, contents: str) -> str:
45
45
elif inverse >= heading :
46
46
break
47
47
sub_section = [x for y in sub_section for x in y ]
48
- sub_section = [re .sub (r'\^\w+$' , '' , x ) for x in sub_section ]
48
+ sub_section = [re .sub (r'\[?\ ^\w+$' , '' , x ) for x in sub_section ]
49
49
sub_section = '\n ' .join (sub_section )
50
50
return sub_section
51
51
elif '#^' in citation_part :
You can’t perform that action at this time.
0 commit comments