Open garretthyder opened 4 years ago
@garretthyder Sorry, have been a bit busy the past days, will resume checking on these issues.
@garretthyder Can you please show the piece of syntax that didn't preserve the new lines?
Hi @amostajo no worries, sorry for my delayed response.
Here's the before/after of the prettify command on my in progress project; https://gist.github.com/garretthyder/07f2729b6a297cd100d386aa6bb00446
The first thing to note is the new lines between code gets stripped as does some that was surrounding functions.
Also note some oddities that occur with the conditional becoming multi-line and only one of the add_assets becoming multiline.
Umm, ok lets review what we can do, in the meantime you can user option --nopretty
to preserve your double lines.
Example:
php ayuco add:init ConfigController@init --nopretty --comment="Configuration settings."
Btw...
For this:
$this->add_action( 'admin_menu', 'AdminController@menu' );
Try the addon: https://github.com/10quality/wpmvc-addon-administrator
Thanks @amostajo sounds good, I'll use nopretty for the time being.
And that addon looks awesome, I'll delve in and add it to my roadmap for a future update.
Hello @amostajo,
Testing the PrettifyCommand I found it stripped all empty lines from my code causing everything to be bunched together and harder to read. It would be nice if it's possible to keep newlines preserved.
Thanks