I'm in the process of building a website where people can submit articles and such. As part of the "enhancements" we are trying to do is color coding code peices. I'm trying to use highlight_string since that seems to already to the functionality I need. However, I'm having a bit of a problem with it.
If I pass it a piece of code that uses double-quites " for the string, it turns on the right color, but never seems to turn it off.....If we use single quoes ' it comes out OK.
What gives? Any clues?
Question regarding highlight_string.....
Moderator: General Moderators
For some reason, it had to do with the quotes not being properly escaped....
We've since found a work around, but here's what the original results was like:
http://developerkb.jodohost.com/modules ... 9&forum=22
how ever, our work around resulted in yet another problem in which things are being replaced when they shouldn't be....l
http://developerkb.jodohost.com/modules ... =22&jump=1
The sample code in the second example should have \\ where it shows \, and \\\\ where it shows \\.... it's all very wierd and confusing.
We've since found a work around, but here's what the original results was like:
http://developerkb.jodohost.com/modules ... 9&forum=22
how ever, our work around resulted in yet another problem in which things are being replaced when they shouldn't be....l
http://developerkb.jodohost.com/modules ... =22&jump=1
The sample code in the second example should have \\ where it shows \, and \\\\ where it shows \\.... it's all very wierd and confusing.