I think the current regexp in javascript.lang matches too much:

regexp = '/(\\.|[^\\/])+/[gim]*(?![*/])'

This matches /* */ comments that do not span multiple lines. (Note that /* */ comments that do span multiple lines are highlighted correctly as comments.)

I think this would fix the problem:

regexp = '/(\\.|[^*\\/])(\\.|[^\\/])*/[gim]*(?![*/])'

Does that seem reasonable? (aside from its increasing ugliness)


_______________________________________________
Help-source-highlight mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-source-highlight

Reply via email to