Javascript to format Arduino code

Javascript to format Arduino code

I will be upfront about this: I have asked this question on several other forums but have had no usefull replies so I thought that I would try here where you specialise in javascript and jquery.I am trying to implement some keyword colour formatting used in Arduino micro controller code. I used Javascript’s to apply the relevant classes to the keywords but as you can see here http://jsfiddle.net/5xuER/embedded/result/ the scripts obviously enough changed the text colour of all of the full or partial keywords on the page which I do not want. I have tailored the modifiers to suit the case of the keywords as required, so they do not affect the text in the code comments. How can I target only the code in the five scroll boxes here http://www.pedroduino.com/7SegLEDcircuits.php I was thinking that I could put each scroll box in it’s own div and hopefully target the Javascript to affect only these divs. Any help or advice would be greatly appreciated thanks Pedro.