From: SourceForge.net <no...@so...> - 2005-08-31 17:15:20
|
Bugs item #958013, was opened at 2004-05-21 09:47 Message generated for change (Comment added) made by silverquick You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100588&aid=958013&group_id=588 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: text area and syntax packages Group: minor bug Status: Open Resolution: None Priority: 5 Submitted By: Kuba (malyvelky) Assigned to: Nobody/Anonymous (nobody) Summary: PHP mode "//" comment syntax highlighting is incorrect Initial Comment: PHP mode included in Jedit 4.2pre13 ignores the fact, that the // comment is not always until the end of the line - it comments out the text between '//' and end of line OR '//' and end of a block: // ok, all of this is a comment //"<?= 'This is a coment but ';?>"; all after '?>' is not a comment, but an html code I hope I do not post this at a wrong place. Sincerely Yours Kuba ---------------------------------------------------------------------- Comment By: silverquick (silverquick) Date: 2005-08-31 13:15 Message: Logged In: YES user_id=1337623 This caught my attention and I've been working on it for over an hour, when I really should have been using jEdit for real programming. :) I ended up trying these additions to modes/php.xml: <SEQ DELEGATE="PHP_LINECOMMENT">//</SEQ> <SEQ DELEGATE="PHP_LINECOMMENT">#</SEQ> <RULES SET="PHP_LINECOMMENT" DEFAULT="COMMENT1"> <SEQ TYPE="NULL" DELEGATE="MAIN">?></SEQ> <SEQ TYPE="NULL" DELEGATE="PHP">
</SEQ> </RULES> (I hope those show up ok) The idea is that a line comment will end at either a "?>" or a newline, whichever comes first. However this didn't work. The comments now end properly at PHP closing tags but fail to end at newlines. Any ideas? I've also been trying to think of a regexp that would catch line comments and make them end at a "?>", but no luck so far. Back to real work for now. ---------------------------------------------------------------------- Comment By: scragz (scragz) Date: 2004-08-12 06:46 Message: Logged In: YES user_id=775029 Confirming that PHP does stop parsing at a '?>' when it is in a line comment. I suppose jEdit should reflect this, right? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100588&aid=958013&group_id=588 |