Extra slashes `//` in magic command output? and `None` if Python code does not print anything to stdout...
macOS 15.3.1 + Obsidian 1.8.7
// slashes
Not sure if it changed since 2.1.0 but... @vault_url is generating double slashes in its output
print("Vault url:", @vault_url)
None output
Also, if there is nothing printed to stdout, the codeblock displays the text None. Pretty sure that isn't intentional either.
print("Vault url:", @vault_url)
vs
print('hello')
print("Vault url:", @vault_url)
Just reporting, with 2.1.2 ... still the same.
Example, I would expect the below to only show the image, but None is printed as well
Thanks for checking @luckman212 ! Are you executing the code in notebook mode? (That would explain the None)
If you try print("Vault url:", @vault_url) again, does it still print the wrong path? Hopefully I was at least able to fix that part...
Yes @twibiral the double slash problem is fixed 🚀
Not sure what you mean "notebook mode" - reading mode? If that's what you meant then "Yes" I am executing the codeblocks in Reading Mode. I still use the split-pane view (left side "source" mode and right side "reading" mode, I am most comfortable with this setup (I don't use Live Preview mode).
Oh I see Notebook Mode is in the Plugin settings... sorry. I didn't realize, not sure what that setting does yet, I will try to learn about it.
Anyway "yes" the Notebook Mode toggle was "On", I also tried turning it Off which did not make a difference.
@luckman212 The notebook mode creates a global environment for the code you run, similar to Jupyter notebook. It works fine most times, but sometimes it has some funky issues