Closed Cipa closed 6 years ago
This is a dupe, but I cant find the long lines tokenizing issue. @kevinsawicki, help!
Wait, I take that back. It might be a regex issue on the https://github.com/atom/language-php repo. Looks like it's not all hosed.
I believe is the long line length bug that is being tracked over in https://github.com/atom/atom/issues/1667
I'm not sure it's > 100 tokens, though. Not sure.
@Cipa Can you provide the text from the screenshot?
I'll reopen
$sql = 'SELECT modx_site_content.id,longtitle FROM modx_site_content JOIN modx_site_tmplvar_contentvalues ON contentid = modx_site_content.id WHERE template = 15 AND deleted = 0 AND published = 1 AND hidemenu = 0 AND modx_site_tmplvar_contentvalues.tmplvarid = 40 AND (modx_site_tmplvar_contentvalues.value LIKE "'.$parent.'||%" OR modx_site_tmplvar_contentvalues.value LIKE "%||'.$parent.'||%" OR modx_site_tmplvar_contentvalues.value LIKE "%||'.$parent.'" OR modx_site_tmplvar_contentvalues.value LIKE "'.$parent.'")';
Looks like it's 500+ long
Thanks
@Cipa and just to confirm, which part isn't the right color?
One comes to mind I think modx_site_content.id, longtitle should look similar as they are fields in the table. One is prefixed with the table name and the other isn't. At least id and longtitle should be colored the same way.
I'll add more
Also have a look at this
This is short line under 100 characters. You can see that modx_site_content.id, longtitle are colored differently. I don't think they should or at least id and longtitle should be the same color and highlighted more than the table name
Also contentid = modx_site_content.id
should be colored differently. See my suggestions above
comment gray out was not working in PHP after long SQL strings for me so I fixed it by setting PREFFERED LINE LENGTH to 5000 in the PHP GRAMMAR package settings......also had to do this for default softwrap as well
config.cson "*": core: restorePreviousWindowsOnStart: "no" telemetryConsent: "limited" editor: preferredLineLength: 5000 "exception-reporting": userId: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" welcome: showOnStartup: false ".html.php.text": editor: preferredLineLength: 5000
EDIT: nevermind with softwrapping enabled OR disabled the PHP grammar still pukes all over itself EDIT2: when placing ?><?php after the first wrapped line (I beleive softwrapping is still hardcoded at some pre-difined amount as it still does this with softwrap globally disabled) then it works after that :/
Not sure if this is still an issue, we can re-open if so.
Currently
<?php
$sql = 'SELECT modx_site_content.id,longtitle FROM modx_site_content JOIN modx_site_tmplvar_contentvalues ON contentid = modx_site_content.id WHERE template = 15 AND deleted = 0 AND published = 1 AND hidemenu = 0 AND modx_site_tmplvar_contentvalues.tmplvarid = 40 AND (modx_site_tmplvar_contentvalues.value LIKE "'.$parent.'||%" OR modx_site_tmplvar_contentvalues.value LIKE "%||'.$parent.'||%" OR modx_site_tmplvar_contentvalues.value LIKE "%||'.$parent.'" OR modx_site_tmplvar_contentvalues.value LIKE "'.$parent.'")';
?>
renders as:
Thanks