Aug 24 2004
I’ve been trying to find a good customisable Syntax Highlighter for use in a VB.NET project. The highlighter HAS to be able to highlight PHP.
I’ve been trawling through Google for sometime now and have only been able to find commercial solutions (http://www.actiprosoftware.com/Products/DotNet/SyntaxEditor/Default.aspx).
The only open source solution that I have been able to find is at http://www.codeproject.com/vb/net/RTBClass.asp. This solution is a wrapper for the Richtextbox that comes as a standard .NET control and uses regular expressions to identify the code to highlight. The only problem with this solution is that it isn’t able to handle syntax highlighting over several lines. Whilst this isn’t a problem whilst highlighting VB code, as soon as you try and highlight a comment or a quoted string that runs over several lines (as in PHP), it falls over. This is because this solution highlights one line at a time and isn’t, therefore, capable of doing multi-line highlighting.
I found a post at http://weblogs.asp.net/rpooley/archive/2003/09/04/26361.aspx that at first glance seemed promising, but one again I was face with the same dead end.
I guess I just have to keep looking…