We know you have an opinion on how things should be run around here. These are suggestions for the forums, and the website.This forum is not a place to ask for suggestions to your own coding (or otherwise) problems.
The HTML tags work just fine. Your problem is the fact that you've included Javascript which will not parse as HTML. The same goes for PHP in HTML. There is little to nothing we can do.
feyd wrote:The HTML tags work just fine. Your problem is the fact that you've included Javascript which will not parse as HTML. The same goes for PHP in HTML. There is little to nothing we can do.
That's very defeatest. The Zend Studio IDE copes with everything I've just mentioned and more. So clearly it is possible, in fact with enough time and will I could do it myself.
ole wrote:That's very defeatest. The Zend Studio IDE copes with everything I've just mentioned and more. So clearly it is possible, in fact with enough time and will I could do it myself.
No, it's being realistic and understanding the plugin that's used for highlighting does not understand multiple languages in a single snippet. It would have to know a lot more in order to highlight everything perfectly.
However, if you wish to make a better highlighter that supports context sensitive highlighting and all the languages we support like that, be my guest.
A simpler refinement to the algorithm would be to detect instances of <script> and then highlight it as a script until a "</script>" string is encountered.
Ambush Commander wrote:A simpler refinement to the algorithm would be to detect instances of <script> and then highlight it as a script until a "</script>" string is encountered.
The highlighter is a fairly basic lexer with very little understanding of the data it is parsing. It would likely require a fairly significant modification.
<script language="text/javascript"><!--
x = "black&orange";
--></script>
If this displays properly, wouldnt be hard to modify the 'COMMENT_MULTI' handler to take that block and run it through the Javascript syntax highlighter.
ReDucTor wrote:If this displays properly, wouldnt be hard to modify the 'COMMENT_MULTI' handler to take that block and run it through the Javascript syntax highlighter.
That would have repercussions for the other syntaxes though.
ReDucTor wrote:Upgrading Geshi fixes some of the problems
We're holding off on making modifications until after we've settled on the phpbb 3 upgrade, I believe. phpbb 3's variant is newer, if I recall.
GeSHi is a part of phpBB? I did not know that.
I'd think that parsing <script> inside of HTML wouldn't be too difficult if GeSHi didn't always do all of the work, such as adding the surrounding tags and such.