asm, javascript and brackets { }

I have implemented a class layer for ChartJS, and when rendering the chart I'am using asm for writing javascript code mixed with pascal code. This is a great feature!

But it is a little annoying when code or data within brackets { } will be shown just like a comment section. Any way to achieve better syntax visualization when coding and using asm and { }?

I am coding in Delphi 10.4.

Sadly this is a Delphi IDE editor limitation, it does not understand JavaScript.
Put such code in an {$IFNDEF WIN32} {$ENDIF} block for example.

It should have been possible to code special section without default syntax formatting. That would be great. Maybe it is possible to add custom plugin for formatting? I have not checked for that possibility yet. Shall do.
But It can also be solved like this (not good, but better)

1 Like