diff --git a/pagure/static/vendor/highlightjs-line-numbers/INFO b/pagure/static/vendor/highlightjs-line-numbers/INFO index 0c705b5..5828028 100644 --- a/pagure/static/vendor/highlightjs-line-numbers/INFO +++ b/pagure/static/vendor/highlightjs-line-numbers/INFO @@ -4,6 +4,6 @@ https://github.com/wcoder/highlightjs-line-numbers.js Downstream repo: https://pagure.io/pagure-highlightjs-line-numbers.js It adds some additional classes and links on the line numbers to get some stuff -in Pagure working. +in Pagure working and disables inline style tag injection to avoid CSP errors -This file version comes from this commit: https://pagure.io/pagure-highlightjs-line-numbers.js/tree/a8a95ff2384d9f03d8aa832e793ce0af464329ff +This files version comes from this commit: https://pagure.io/pagure-highlightjs-line-numbers.js/c/28702694fea765b90c53690db63b545b2aa0d8b0 diff --git a/pagure/static/vendor/highlightjs-line-numbers/highlightjs-line-numbers.min.css b/pagure/static/vendor/highlightjs-line-numbers/highlightjs-line-numbers.min.css new file mode 100644 index 0000000..7229a7e --- /dev/null +++ b/pagure/static/vendor/highlightjs-line-numbers/highlightjs-line-numbers.min.css @@ -0,0 +1 @@ +.hljs-ln{border-collapse:collapse}.hljs-ln td{padding:0}.hljs-ln-n:before{content:attr(data-line-number)} \ No newline at end of file diff --git a/pagure/static/vendor/highlightjs-line-numbers/highlightjs-line-numbers.min.js b/pagure/static/vendor/highlightjs-line-numbers/highlightjs-line-numbers.min.js index 9c3e9a6..cf5c61f 100644 --- a/pagure/static/vendor/highlightjs-line-numbers/highlightjs-line-numbers.min.js +++ b/pagure/static/vendor/highlightjs-line-numbers/highlightjs-line-numbers.min.js @@ -1 +1 @@ -!function(e,n){"use strict";function t(){var e=n.createElement("style");e.type="text/css",e.innerHTML=u(".{0}{border-collapse:collapse}.{0} td{padding:0}.{1}:before{content:attr({2})}",[f,v,b]),n.getElementsByTagName("head")[0].appendChild(e)}function r(t){"interactive"===n.readyState||"complete"===n.readyState?l(t):e.addEventListener("DOMContentLoaded",function(){l(t)})}function l(t){try{var r=n.querySelectorAll("code.hljs");for(var l in r)r.hasOwnProperty(l)&&i(r[l],t)}catch(o){e.console.error("LineNumbers error: ",o)}}function i(e,n){if("object"==typeof e){n=n||{singleLine:!1};var t=n.singleLine?0:1;h(function(){a(e),e.innerHTML=o(e.innerHTML,t)})}}function o(e,n){var t=c(e);if(""===t[t.length-1].trim()&&t.pop(),t.length>n){for(var r="",l=0,i=t.length;l