When using a file name replacement regex, this regex replacement is also used for attachment file paths. This generates very annoying results with regexes which sanitize file names (see example).
Maybe I'm misunderstanding the plugin settings. Ideally, I just want to have my attachments (and docs, but that works) in the same structure as my Obsidian vault, just with sanitized file names (the docs/images subfolder is just for an easier bug report).
How to reproduce ?
Create fresh vault
Attach an image to the welcome page, e.g. This is an example.jpeg; I use _attachments as subfolder name, not sure if that's important
Share the welcome page
Use the plugin configuration below
Refresh published and upload new notes
The image will be named docs-images-This-is-an-example.jpeg and will be located in the root dir
Minimal Reproducible Example
---
share: "true"
---
But why?
![[any-attached-image-here.jpg]]
SYSTEM INFO:
Obsidian version: v1.5.12
Installer version: v1.4.13
Operating system: #29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr 4 14:39:20 UTC 2 6.5.0-28-generic
Login status: not logged in
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 1
Plugins enabled: 1
1: Github Publisher v7.0.6
RECOMMENDATIONS:
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.
Issue validation
Command used
Refresh published and upload new notes
Plugin version
7.0.6
Describe the bug
When using a file name replacement regex, this regex replacement is also used for attachment file paths. This generates very annoying results with regexes which sanitize file names (see example).
Maybe I'm misunderstanding the plugin settings. Ideally, I just want to have my attachments (and docs, but that works) in the same structure as my Obsidian vault, just with sanitized file names (the
docs/images
subfolder is just for an easier bug report).How to reproduce ?
This is an example.jpeg
; I use_attachments
as subfolder name, not sure if that's importantRefresh published and upload new notes
docs-images-This-is-an-example.jpeg
and will be located in the root dirMinimal Reproducible Example
Configuration
Relevant log output
No response
OS
Linux
Anything else?
No response
Obsidian information