ColorizeScript challenge

Geoff Canyon gcanyon at inspiredlogic.com
Thu Apr 27 10:21:56 CDT 2006


On Apr 27, 2006, at 6:28 AM, Dave Cragg wrote:

> On 27 Apr 2006, at 12:31, Geoff Canyon wrote:
>>
>> Attempting to take back the beer (I don't drink, so I'm not sure  
>> why I'm bothering...)
>
> And I don't colorize my scripts. How pathetic are we? Make sure  
> Richard buys you a nice meal.

I don't colorize either. What a couple of saps.

>> put ("oh no, #this will be a comment")
>>
>> Everything after the # would be colored as a comment. I didn't  
>> know until now that the above breaks the "quoted text is one word"  
>> rule. There are eight words in that line according to Revolution.
>
> I'm not sure I want to know that. One more things to worry about.

I think if I really want the beer (maybe tonight) I'd rewrite my code  
to simply loop through the characters of the script and keep my own  
state variables: inBlockComment, inQuotedString. Assemble words, put  
them into the HTML, etc. <sigh>

What's the use of lines, words, etc. for a task like this? Not much,  
I'm afraid.

gc


More information about the metacard mailing list