hunyadi / md2conf

Publish Markdown files to Confluence wiki
MIT License
56 stars 31 forks source link

Pictures in a subfolder don't show #35

Closed ojacques closed 5 months ago

ojacques commented 7 months ago

When a markdown document references a picture in a subfolder:

![my picture](images/picture.jpg)

The picture is properly uploaded as attachment to the confluence page. But it is not displayed.

When looking at the attachment in confluence (which is named images/picture.jpg, I cannot display the picture either.

This is a common use case, so documenting this as limitation is not very friendly.

hunyadi commented 5 months ago

This appears to have been a regression.

Changes have been pushed to the branch master to substitute any character outside the allowed set of characters with the placeholder _ (underscore). Normally, Confluence would only allow alphanumeric characters (0-9, a-z and A-Z) and special characters _ (underscore), - (hyphen) and . (dot) in attachment names but this is not strictly enforced for all API calls. Any characters that don't match these are now replaced with _, including the path separator /.

Once these changes are applied, images display in published Markdown documents as expected, including those with non-trivial relative paths w.r.t. the base folder.

ojacques commented 5 months ago

Great, thanks!