-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP: Unsupported if: else: endif: endforeach; #5170
Comments
hey @tecnoweb, thanks for the report. can you reproduce the issue in the kitchen sink with PHP mode on? when I paste the code from the issue there, it gets syntax highlighting (see screenshot, made with Dracula theme enabled). Also, which theme are you using? Try using a different theme to see if syntax highlighting becomes visible. |
Thank you for the details and screenshots. This is how I understood the issue, please correct me if I'm wrong: ace PHP mode does not recognise alternative syntax with colons as nested code and does not show the folding controls, and does not highlight closing tag (e.g. |
This might be fixed by using pythonic folding mode for PHP (since it also handles nested code structures without braces), or mixing CStyle folding mode with pythonic one using mixed folding mode, or implementing PHP folding mode which would handle both cases - I am not sure which would help, these are listed in order of approximate effort required. Folding mode would be used in the PHP mode. Contributions are welcome! |
I have try to add some modification but unable to do it can you help me ? i have try make this .. but not work.. `"use strict"; var oop = require("../lib/oop"); function PHPAlternativeFoldMode() { oop.inherits(PHPAlternativeFoldMode, BaseFoldMode); exports.PHPAlternativeFoldMode = PHPAlternativeFoldMode; |
#5491 with a fix was merged, should be available in the next release |
Describe the bug
If I try to parse if($variale == true): return true; else: return false; endif;
the editor not recognize the part of stack code
the same issue is applied on
foreach($variable as $key):
endforeach;
the editor not recognize the part of stack code
Expected Behavior
not parse this part of code
Current Behavior
I don't have error but not parse this part of code
Reproduction Steps
foreach($variable as $key):
endforeach;
if($variale == true): return true; else: return false; endif;
Possible Solution
No response
Additional Information/Context
No response
Ace Version / Browser / OS / Keyboard layout
latest/Safari/Mac/IT
The text was updated successfully, but these errors were encountered: