mirror of
https://github.com/clearlinux/clearlinux.github.io.git
synced 2026-06-27 08:26:34 +00:00
19 lines
380 B
JavaScript
19 lines
380 B
JavaScript
/**
|
|
* @file
|
|
* Enables syntax highlighting via HighlightJS on the HTML code tag.
|
|
*/
|
|
|
|
(function (Drupal) {
|
|
'use strict';
|
|
|
|
Drupal.behaviors.codesnippet = {
|
|
attach: function (context, settings) {
|
|
hljs.initHighlightingOnLoad();
|
|
context.querySelectorAll('pre code').forEach(element => {
|
|
element.style.overflowX = 'auto';
|
|
});
|
|
}
|
|
};
|
|
|
|
})(Drupal);
|