Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Compatibility with image captions #209

Open
6 of 13 tasks
0xlevel opened this issue Nov 28, 2022 · 0 comments
Open
6 of 13 tasks

Bug: Compatibility with image captions #209

0xlevel opened this issue Nov 28, 2022 · 0 comments
Assignees
Labels
bug/issue Something isn't working

Comments

@0xlevel
Copy link

0xlevel commented Nov 28, 2022

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:

Engelbart|"A few nanoseconds of satisfaction are left, before…"

A quick and dirty fix, is to push the margin back:

Engelbart|left ----- "A few nanoseconds of satisfaction are left, before…"

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?

  • New Editor
  • Legacy Editor

In which mode(s) does the problem occur? (if applicable)

  • Reading View (Preview)
  • Editing View - Source Mode
  • Editing View - Live Preview

Which operating system?

  • Windows
  • macOS
  • Linux
  • Android
  • iOS

Checklist

  • I updated to the latest version of the theme (Settings → Appearance → Themes - Manage → Update).
  • I made sure that the issue is related to this theme by checking that the problem does not occur with the default theme.
  • 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!

@0xlevel 0xlevel added the bug/issue Something isn't working label Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/issue Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants