mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-16 13:00:42 +01:00
Check if hljs has language (#699)
This commit is contained in:
parent
f622fa5ed5
commit
f3b0022b54
@ -53,7 +53,7 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
||||
if (typeof(hljs) === 'undefined') {
|
||||
return htmlize(code);
|
||||
}
|
||||
if (lang) {
|
||||
if (lang && hljs.getLanguage(lang)) {
|
||||
return hljs.highlight(code, {language: lang}).value;
|
||||
}
|
||||
return hljs.highlightAuto(code).value;
|
||||
|
Loading…
x
Reference in New Issue
Block a user