summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAgathe Porte <microjoe@microjoe.org>2022-04-27 13:41:35 +0200
committerAgathe Porte <microjoe@microjoe.org>2022-04-27 13:41:35 +0200
commitbc16bf5080cc78a977e22dc6ec949b601464f258 (patch)
treec342b67fa483a4c92b7d6250d377fffbb3c904d4
parentb0998af69e683d51706f9655c2e80c49cc008330 (diff)
downloadpelican-dir-attach-bc16bf5080cc78a977e22dc6ec949b601464f258.tar.gz
pelican-dir-attach-bc16bf5080cc78a977e22dc6ec949b601464f258.zip
feat: support dir_attach in links
-rw-r--r--dir_attach/__init__.py1
1 files changed, 1 insertions, 0 deletions
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"),
)