From bc16bf5080cc78a977e22dc6ec949b601464f258 Mon Sep 17 00:00:00 2001 From: Agathe Porte Date: Wed, 27 Apr 2022 13:41:35 +0200 Subject: feat: support dir_attach in links --- dir_attach/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dir_attach/__init__.py b/dir_attach/__init__.py index c19f6dd..930220c 100644 --- a/dir_attach/__init__.py +++ b/dir_attach/__init__.py @@ -68,6 +68,7 @@ def expand_dir_attach(content, dirname): # a whole content.replace to avoid to replace inside of paragraphs, etc. regexes = ( (r"^(.. \w+::) {dir_attach}(.*)$", fr"\1 {dest}\2"), + (r"^(.. _.*:) {dir_attach}(.*)$", fr"\1 {dest}\2"), (r"^( :\w+:) {dir_attach}(.*)$", fr"\1 {dest}\2"), ) -- cgit v1.2.3