|
From: | Lorenzo Bettini |
Subject: | Re: [Help-source-highlight] regexp in javascript.lang (again) |
Date: | Tue, 02 Sep 2008 16:04:20 +0200 |
User-agent: | Thunderbird 2.0.0.16 (X11/20080724) |
address@hidden wrote:
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)
I think you're right! and it's not that ugly after all :-) -- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino ICQ# lbetto, 16080134 (GNU/Linux User # 158233) HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com http://www.myspace.com/supertrouperabba BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com http://www.gnu.org/software/src-highlite http://www.gnu.org/software/gengetopt http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
[Prev in Thread] | Current Thread | [Next in Thread] |