When syntax highlighting seems not working properly, try the following procedure:
In the CotEditor app
on your Mac, choose Format > Syntax > Recolor All.
If it doesn’t help, the possible causes are:
There is something inadequate in your text (for example, inadequate programming syntax).
There is something inadequate in your syntax definition.
CotEditor's syntax highlighting extraction algorithm cannot correctly identify the sections to highlight.