tillahoffmann / obsidian-jupyter

MIT License
438 stars 23 forks source link

Glitchy in Obsidian Live Preview #39

Closed aidan-gibson closed 1 year ago

aidan-gibson commented 2 years ago

In Obsidian Reader View, everything runs as expected (shown in screencap below).

iframe-reading

In Obsidian Live Preview view, three backticks are visible after the print statement; they should not be there. The formatting of the output cell is also significantly messier, taking up much more space than it should and not having a distinct separation from the source code cell. iframe-livepreview

Expected Behavior: Everything in Live Preview mode should mirror Reading mode exactly; except when the code block is being edited.

(P.S. THANK YOU for making this plugin! I'm absolutely in love with this and will try to submit PRs when possible. I'm extremely excited for other languages being supported as well.)

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Loigzorn commented 2 years ago

yes I can confirm the behaviour, its the same for me

image

Loigzorn commented 2 years ago

@tillahoffmann as you pinned the issue as 'help wanted', do you have a clue what the steps required to resolve this bug? Or do you have a clue what might cause this behaviour?

tillahoffmann commented 2 years ago

It would require someone to have a look at the CSS/HTML that's used in the live preview mode and determine how/why the output of the Jupyter cell interferes with it. Another option would be to wrap the result in an iframe as in #40, but the size of the frame would have to be adjusted at runtime to fit the content. The help wanted label encourages contributions in the form of PRs.