Skip to content

Commit 1029132

Browse files
committed
v0.4.1: fix a bug in image_re_subs of link_replacement
1 parent 24f003a commit 1029132

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dactyl/filter_link_replacement.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ def re_sub_links(soup, link_re_subs):
102102
links = soup.find_all("a", href=True)
103103
for link in links:
104104
for regex,replace_pattern in link_re_subs.items():
105-
m = re.match(regex, a["href"])
105+
m = re.match(regex, link["href"])
106106
if m:
107107
new_path = re.sub(regex, replace_pattern, link["href"])
108-
logger.info("... replacing image link '%s' with '%s'" %
108+
logger.info("... replacing link '%s' with '%s'" %
109109
(link["href"], new_path) )
110110
link["href"] = new_path
111111

dactyl/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.4.0'
1+
__version__ = '0.4.1'

0 commit comments

Comments
 (0)