Hello All,
I have created an extension in VS code which will inject syntax highlighting for javascript within multi-line python strings.
https://marketplace.visualstudio.com/items?itemName=StevenAllenKing.python-string-syntax-highlight
When developing clientside callbacks in Dash Apps, I have found that the lack of syntax highlighting makes it difficult to troubleshoot javascript code when passing that code as a string.
Here is an example of the syntax, all you have to do is add //js
at the beginning of your multi-line string and ;//
at the end of the string and vscode will pick up the default javascript syntax highlighting.
Before:
After:
Here is the link to the repo if anyone wants to contribute or finds any bugs with the extension.
https://github.com/StevenAllenKing/python-string-syntax-highlight
Thank you,
Steven King