help-source-highlight
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-source-highlight] regexp in javascript.lang (again)


From: gnombat
Subject: [Help-source-highlight] regexp in javascript.lang (again)
Date: Tue, 02 Sep 2008 08:55:37 -0500
User-agent: Thunderbird 2.0.0.16 (Windows/20080708)

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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]