mProjectsCode / obsidian-js-engine-plugin

https://www.moritzjung.dev/obsidian-js-engine-plugin-docs/
GNU General Public License v3.0
73 stars 5 forks source link

`Info` option in the context menu of a js-engine codeblock ? #11

Closed I-Pch closed 5 months ago

I-Pch commented 5 months ago

Hi there 😄 !

So I installed JS Engine for the first time last night and I just wanted to know:

What's the Info option in the context menu of a js-engine codeblock ? 😊 (the context menu being the one we can access when hovering the codeblock, which also contains the option to Rerun) What is it supposed to do ?

I'm asking because when I select Info in the menu, all I get is an empty modal I can only close 😄 (Both on Desktop and Mobile) ...

JS Engine - Context menu JS Engine - Info Modal

Sorry for the newbie JS Engine question 🙈 ... But thank you very much in advance for shedding some light on this 💡 😁 !


Edit: Oh! I just checked in the console and I get this error each time I select Info in the menu 😅 :

Uncaught TypeError: Cannot read                 plugin:js-engine:45    
properties of undefined (reading 'highlight')
    at n.$$.update (plugin:js-engine:45:65891)
    at Z (plugin:js-engine:44:4858)
    at new Ws (plugin:js-engine:45:66001)
    at Uo.onOpen (plugin:js-engine:45:66352)
    at e.open (app.js:1:1455869)
    at Go.openExecutionStatsModal (plugin:js-engine:45:66940)
    at Bo.openStatsModal (plugin:js-engine:45:61948)
    at eval (plugin:js-engine:45:1487)
    at e.handleEvent (app.js:1:1169857)
n.$$.update               @ plugin:js-engine:45
Z                         @ plugin:js-engine:44
Ws                        @ plugin:js-engine:45
onOpen                    @ plugin:js-engine:45
e.open                    @ app.js:1
openExecutionStatsModal   @ plugin:js-engine:45
openStatsModal            @ plugin:js-engine:45
eval                      @ plugin:js-engine:45
e.handleEvent             @ app.js:1

I only have 2 other plugins installed and enabled (Templater & Logstravaganza) in that vault, latest version of Obsidian (1.5.12 - Installer 1.5.8) no theme and no CSS snippet 😊

mProjectsCode commented 5 months ago

huh, it seems like something with the highlighting fails there. Will take a look later today.

mProjectsCode commented 5 months ago

I just released 0.1.5, hopefully that fixes the issue.

I-Pch commented 5 months ago

I can happily confirm that 0.1.5 fixes the Info issue both on Desktop and Mobile 🙌 😁 !!!

Thank you for investigating this and the more than very fast fix 🎉 🙌 !