This is a bug in the Ace Editor code used by Caret. While waiting for the source to be patched, you can correct it yourself:
- Insert
this.lineCommentStart = "%";
at line 139 of/js/ace/mode-tex.js
in Caret's source code. - Then reload Caret as an unpackaged extension.
Update: the bug has been fixed for the next build. The fix won't be seen in Caret until its author updates however.