1/** 2 * @file 3 * Enables syntax highlighting via HighlightJS on the HTML code tag. 4 */ 5 6(function (Drupal) { 7 'use strict'; 8 9 Drupal.behaviors.codesnippet = { 10 attach: function (context, settings) { 11 hljs.initHighlightingOnLoad(); 12 context.querySelectorAll('pre code').forEach(element => { 13 element.style.overflowX = 'auto'; 14 }); 15 } 16 }; 17 18})(Drupal);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.