obsidian-sanctum
obsidian-sanctum copied to clipboard
Bug: Compatibility with image captions
Bug Description
If the part of an image tag after the pipe contains keywords of the side note syntax (e.g. left
, right
or center
) the layout will be interpreted as such. The image will be moved left outside the page (neg. margin).
I use the plugin bicarlsen/obsidian_image_caption: Add captions to images in Obsidian., which allows to add captions. This is a special case and this syntax is not following the standard Obsidian format (hence, not really a "bug", sorry). But it is also quite common to utilize the post-pipe text in links and it might be an easy fix.
To Reproduce
Catches the "left" keyword as side note syntax, adds a neg. margin and moves the image left, outside the page:
A quick and dirty fix, is to push the margin back:
Expected behavior
The text after the pipe (or any exclusion by a custom rule/character) should not be interpreted as side note syntax.
Relevant Screenshot(s)
sorry, not necessary, but placed a page with the sanctum theme, the css clearly shows th effect for margin-left:
.markdown-rendered img[alt*=left], .workspace-leaf-content img[alt*=left] {
margin-left: calc(-50% + var(--move));
}
Obsidian Version
0.15.9
Installer Version
v1.0.3
Font Size
14
Which editor are you using?
- [X] New Editor
- [ ] Legacy Editor
In which mode(s) does the problem occur? (if applicable)
- [X] Reading View (Preview)
- [ ] Editing View - Source Mode
- [ ] Editing View - Live Preview
Which operating system?
- [ ] Windows
- [X] macOS
- [ ] Linux
- [ ] Android
- [ ] iOS
Checklist
- [X] I updated to the latest version of the theme (Settings → Appearance → Themes - Manage → Update).
- [X] I made sure that the issue is related to this theme by checking that the problem does not occur with the default theme.
- [X] If the bug occured after updating the theme, I read the last couple Releases to make sure the bug is not an intentional change.
Additional Context
I really like the theme. Thank you!