Discuss: (PHP) built-ins are currently purposely not highlighted.
See original GitHub issueDescribe the issue
When PHP is put into the pre and code tags, everything renders correctly except certain functions. They are missing <span class="hljs-keyword">and just left as regular text while other functions get the <span>.
Which language seems to have the issue?
Seems to be PHP but maybe other languages also that need the class=“hljs-keyword”.
Are you using highlight
or highlightAuto
?
I’ve tried both and both are giving me the same exact problem.
Sample Code to Reproduce
Expected behavior
You should see “json_decode” & “file_get_contents” functions white as the other function “isset” is syntaxed.
Additional context
I’m pretty sure they are all considered the same (isset, file_get_contents, json_decode, etc…), so I feel like they should all be the same color no?
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (14 by maintainers)
Closing this original issue as #wontfix, expected behavior in agreement with @Ayesh:
We only highlight reserved words - not ALL built-ins (which is a huge list), though there is already separate discussion to highlight all function dispatch as part of the #2500 initiative.
@Ayesh I’d say if you want to do this along with the other work you’re doing on PHP lately this would be a small improvement. We may want to move the few remaining to a
_
attribute insidekeywords
(since we don’t have a nice way to say “keywords, but do not highlight”) vsbuilt_in
so that NO interfaces are highlighted (rather than just randomly highlighting the few we include) for now.