@@ -88,8 +88,8 @@ def mini_ez_links(urlo, base, end, url_whitespace, url_case):
88
88
internal_link = file_name
89
89
file_path = internal_link .replace (base , '' )
90
90
url = file_path .replace ('\\ ' , '/' ).replace ('.md' , '' )
91
+ url = url_blog + '/' + quote (url )
91
92
url = url .replace ('//' , '/' )
92
- url = url_blog [:- 1 ] + quote (url )
93
93
if not url .startswith (('https:/' , 'http:/' )):
94
94
url = 'https://' + url
95
95
if not url .endswith ('/' ) and not url .endswith (('png' , 'jpg' , 'jpeg' , 'gif' , 'webm' )):
@@ -106,6 +106,8 @@ def strip_comments(markdown):
106
106
markdown = re .sub (r'%%(.*)%%' , '' , markdown , flags = re .DOTALL )
107
107
return markdown
108
108
109
+
110
+
109
111
def cite (md_link_path , link , soup , citation_part , config , callouts , custom_attr , msg ) -> BeautifulSoup :
110
112
"""Append the content of the founded file to the original file.
111
113
@@ -132,6 +134,7 @@ def cite(md_link_path, link, soup, citation_part, config, callouts, custom_attr,
132
134
new_uri = new_uri .replace ('.md' , '/' )
133
135
new_uri = new_uri .replace ('//' , '/' )
134
136
new_uri = re .sub ('https?:\/' , '\g<0>/' , new_uri )
137
+ new_uri = new_uri .replace ('/index/' , '/' )
135
138
input_file = codecs .open (str (md_link_path ), mode = 'r' , encoding = 'utf-8' )
136
139
text = input_file .read ()
137
140
@@ -172,6 +175,7 @@ def cite(md_link_path, link, soup, citation_part, config, callouts, custom_attr,
172
175
)
173
176
link_soup = BeautifulSoup (html , 'html.parser' )
174
177
if link_soup :
178
+
175
179
tooltip_template = (
176
180
"<div class='citation'> <a href='"
177
181
+ str (new_uri )
0 commit comments