From b0998af69e683d51706f9655c2e80c49cc008330 Mon Sep 17 00:00:00 2001 From: Agathe Porte Date: Sun, 30 Aug 2020 17:35:01 +0200 Subject: force 4 spaces for attributes detection --- dir_attach/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dir_attach/__init__.py b/dir_attach/__init__.py index cf0510f..c19f6dd 100644 --- a/dir_attach/__init__.py +++ b/dir_attach/__init__.py @@ -68,7 +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"^(\s+:\w+:) {dir_attach}(.*)$", fr"\1 {dest}\2"), + (r"^( :\w+:) {dir_attach}(.*)$", fr"\1 {dest}\2"), ) for match, replace in regexes: -- cgit v1.2.3