mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-17 05:18:32 +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') {
|
if (typeof(hljs) === 'undefined') {
|
||||||
return htmlize(code);
|
return htmlize(code);
|
||||||
}
|
}
|
||||||
if (lang) {
|
if (lang && hljs.getLanguage(lang)) {
|
||||||
return hljs.highlight(code, {language: lang}).value;
|
return hljs.highlight(code, {language: lang}).value;
|
||||||
}
|
}
|
||||||
return hljs.highlightAuto(code).value;
|
return hljs.highlightAuto(code).value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user