TfTHacker / obsidian42-strange-new-worlds

Revealing the strange new world of connected thoughts in your vault.

Home Page:https://tfthacker.com/SNW

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Referencing a line in a table that also contains references causes odd output

sawft99 opened this issue · comments

Describe the bug
When referencing a line that also contains references such as ![[mydoc#^abs123]] in a table , this generates additional boxes with numbers. This does not occur when referencing a line in a normal context. This is also only an issue when in reading mode

Steps to reproduce the behavior

  1. Create several pages
  2. Write a line in one of the pages linking to several other pages/header/lines etc
  3. In another page create a table referencing the line from step 2 and in that table use '!' to embed it
  4. There should be several additional boxes generated that shouldn't be there once in reading mode

Expected behavior
For it to appear exactly as it does on the page it is from without and additional boxes and numbers

Screenshots

Comparison in source mode when using a table and when you aren't. Followed by their appearance in reading mode

image
image

Desktop (please complete the following information)

OS: Windows 11
Obsidian: 1.1.16
Plugin: 1.1.4
Additional Context
Only happens in reading mode and not live/preview or source

Thank you for reporting this. When using embedded content, Obsidian wraps the whole thing in a box. In those cases, SNW has no were to put the counter except onto a new line. I don't like the way it looks as well, but it is hard to fight the core functionality. Some people get around this with CSS, but this depends on your theme and the context of your content.

What I can recommend, on pages where you don't want to see the block count, add some frontmatter and disable the rendering on that page:

---
snw-file-exclude: true
---

So while the formatting doesn't look good, it isn't actually a bug, but a side effect :-)