Skip to content

Commit 879e916

Browse files
committed
fix: remove footnotes in embeded contents
1 parent 323f487 commit 879e916

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mkdocs_embed_file_plugins/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def search_in_file(citation_part: str, contents: str) -> str:
2727
data = contents.split('\n')
2828
if '#' not in citation_part:
2929
# All text citation
30-
return re.sub(r'\^\w+$', '', contents)
30+
return re.sub(r'\[?\^\w+$', '', contents)
3131
elif '#' in citation_part and not '^' in citation_part:
3232
# cite from title
3333
sub_section = []
@@ -45,7 +45,7 @@ def search_in_file(citation_part: str, contents: str) -> str:
4545
elif inverse >= heading:
4646
break
4747
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]
4949
sub_section = '\n'.join(sub_section)
5050
return sub_section
5151
elif '#^' in citation_part:

0 commit comments

Comments
 (0)