what is the reason having 1st line and last line with ```mermaid and ``` ??
the return become incompatible with mermaid
I used that format inside markdown, simply for a "fast copy-paste".
As of now, this library is pretty old (as you can see, 2 years old), I will eventually come back again when I'll have some spared time, because in the last period I saw that people like using this (I never expected this!). I stopped working simply because of design problems and lack of time.
At the moment, you could just split the return string with the \n character, remove the first and last row, and join using the same character.
About your question, I'll keep this thread open, so whenever I come back to this, I'll remove that header. Thanks.
It is an easy fix, if you allow me, I can make the change and send you merge request.
Indeed it is easy, but I prefer to clean up and improve everything before that.