From: SourceForge.net <no...@so...> - 2007-11-28 23:34:32
|
Bugs item #958013, was opened at 2004-05-21 15:47 Message generated for change (Settings changed) made by blueyed 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 Private: No Submitted By: Jakub Holý (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: 2006-03-26 17:03 Message: Logged In: YES user_id=1337623 Oops, this is embarassing, I got the email and thought the last comment was the latest :) Sorry about that. Is there any way to match a newline? <SEQ TYPE="NULL" DELEGATE="PHP">
</SEQ> evidently doesn't work (neither does " "--also wouldn't work for Macs where newline = "\r". ---------------------------------------------------------------------- Comment By: silverquick (silverquick) Date: 2006-03-26 16:58 Message: Logged In: YES user_id=1337623 Scragz: confirmed. The following code: <?php // if so, the following ?>will display as output Outputs "will display as output" as expected. Also, see the second non-code paragraph here: http://ca.php.net/manual/en/language.basic-syntax.comments.php ---------------------------------------------------------------------- Comment By: scragz (scragz) Date: 2006-03-26 01:58 Message: Logged In: YES user_id=775029 Ignore me, what I posted doesn't really work at all now that I look closer. ---------------------------------------------------------------------- Comment By: scragz (scragz) Date: 2006-03-26 01:42 Message: Logged In: YES user_id=775029 I got pretty close with this: <SPAN TYPE="COMMENT1" NO_LINE_BREAK="TRUE" EXCLUDE_MATCH="TRUE"> <BEGIN>//</BEGIN> <END>?></END> </SPAN> The only thing I can't figure out is how to highlight the BEGIN bit as a comment and not the END bit. ---------------------------------------------------------------------- Comment By: silverquick (silverquick) Date: 2005-08-31 19: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 12: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 |