Loading js/prism.js +6 −7 Original line number Diff line number Diff line Loading @@ -3,18 +3,17 @@ * Basic prism settings. */ (function ($, Drupal, drupalSettings) { (function (Drupal) { 'use strict'; Drupal.behaviors.prism = { attach: function(context, settings) { // Check if an ajax call has been made. $(document).ajaxComplete(function() { // Make sure we highlight any newly added content. // @todo, target specific content wrapper(s)? // Trigger prism to highlight things on the page again after an AJAX // operation has completed. if (context instanceof HTMLElement) { Prism.highlightAll(); }); } } }; })(jQuery, Drupal, drupalSettings); No newline at end of file })(Drupal); Loading
js/prism.js +6 −7 Original line number Diff line number Diff line Loading @@ -3,18 +3,17 @@ * Basic prism settings. */ (function ($, Drupal, drupalSettings) { (function (Drupal) { 'use strict'; Drupal.behaviors.prism = { attach: function(context, settings) { // Check if an ajax call has been made. $(document).ajaxComplete(function() { // Make sure we highlight any newly added content. // @todo, target specific content wrapper(s)? // Trigger prism to highlight things on the page again after an AJAX // operation has completed. if (context instanceof HTMLElement) { Prism.highlightAll(); }); } } }; })(jQuery, Drupal, drupalSettings); No newline at end of file })(Drupal);