aboutsummaryrefslogtreecommitdiffstats
path: root/default-config.json
diff options
context:
space:
mode:
Diffstat (limited to 'default-config.json')
-rw-r--r--default-config.json12
1 files changed, 6 insertions, 6 deletions
diff --git a/default-config.json b/default-config.json
index 6d0a99e..ab6dd93 100644
--- a/default-config.json
+++ b/default-config.json
@@ -55,16 +55,16 @@
],
"filters": [
{
- "name": "url",
- "regex": "(https?:\\/\\/[^ \t]*)",
+ "name": "image",
+ "regex": "(https?:\\/\\/[^']*\\.)(png|jpg|gif|jpeg)([^' ,]*)",
"flags": "g",
- "replace": "<a href='$1' target='_blank' rel='noopener noreferrer'>$1</a>"
+ "replace": "<a href='$1$2$3' target='_blank' rel='noopener noreferrer'><img src='$1$2$3' style='max-width:200px; max-height:200px'/></a>"
},
{
- "name": "image",
- "regex": "(https?:\\/\\/.*\\.)(png|jpg|gif|jpeg)([^ ,]*)",
+ "name": "url",
+ "regex": "(^|[^'])(https?:\\/\\/[^' \t]*)",
"flags": "g",
- "replace": "<a href='$1$2$3' target='_blank' rel='noopener noreferrer'><img src='$1$2$3' style='max-width:200px; max-height:200px'/></a>"
+ "replace": "$1<a href='$2' target='_blank' rel='noopener noreferrer'>$2</a>"
}
]
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage