TL;DR: if possible switch the hiding method from "display:none" to "visibility: hidden", because otherwise code-blocks are rendered wrong
Hi!
First of all, thanks for your plugin. I really want to use it, but I stumbled upon a bug with displaying an answer that includes code.
I did a little digging in your code-base and I found the problem.
In "roamsr.showAnswerAndCloze" you use "display:none" to hide the answer-block.
This is not possible with a code-block because CodeMirror (the editor that Roam uses) does need the elements width, height etc. to properly display the editor.
TL;DR: if possible switch the hiding method from "display:none" to "visibility: hidden", because otherwise code-blocks are rendered wrong
Hi!
First of all, thanks for your plugin. I really want to use it, but I stumbled upon a bug with displaying an answer that includes code.
I did a little digging in your code-base and I found the problem. In "roamsr.showAnswerAndCloze" you use "display:none" to hide the answer-block. This is not possible with a code-block because CodeMirror (the editor that Roam uses) does need the elements width, height etc. to properly display the editor.
See: https://github.com/codemirror/CodeMirror/issues/61
There is two solutions to this problem:
All the best, Lucca