Closed krajniks closed 2 years ago
Does this cause any other unexpected behavior in your testing? What if you also remove the other lines the null out the token?
I think those came in through a PR originally and I'm not sure if they are still required
Finally came around to this.
I did test it some more.
Tokens must be nulled otherwise they get render as html and mermaid can't deal with it. Tokens are always recalculated when file is edited, so current code works just fine in that case. Only when editor loses and regains focus, they are not recalculated and the cleard/nulled ones are used again, which results in no data for mermaid.
No other unexpected behaviour was observed.
Thanks for looking into this. Let's try it out in the next release!
Hey.
I also had problems described in #103 and looked at the code execution.
I have noticed, that for some reason render function executes multiple times (probably when leaving window?). The second time around all content is empty, as it is removed/emptied in first pass. When you start editing file again, tokens are recreated and graph is shown.
not removing token.content seems to fix the behavior.