Sha256: f9675d1f482586557fa865eebc035f5be13eea35612fdb6c3e1b9cf7e096fa78
Contents?: true
Size: 482 Bytes
Versions: 14
Compression:
Stored size: 482 Bytes
Contents
app.directive('highlight', function() { return { restrict: 'EA', link: function ($scope, element, attrs) { var prism = window.Prism; prism.plugins.autoloader.languages_path = 'https://cdn.jsdelivr.net/prism/1.3.0/components/'; element.ready(function() { element.html('<code>' + element.text() + '</code>'); element.addClass('language-' + attrs.highlight); prism.highlightElement(element.find('code')[0]); }); } }; });
Version data entries
14 entries across 14 versions & 1 rubygems