Skip to content

Commit 92959e8

Browse files
committed
Fix up some image links automatically
1 parent 49d4587 commit 92959e8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

build.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ def parse_file(dst_path, fn):
171171
text,
172172
flags=re.M)
173173
text = re.sub(r'^TAGS:.*$', '', text, flags=re.M)
174+
text = re.sub(r'(figure|image):: files/attachments/', r'\1:: attachments/', text, flags=re.M)
175+
text = re.sub(r' <files/attachments/', r' <attachments/', text, flags=re.M)
174176
with open(rst_fn, 'w') as f:
175177
f.write(text)
176178
del text

0 commit comments

Comments
 (0)