[gnome-continuous-yocto/gnomeostree-3.28-rocko: 8001/8267] bitbake: toaster: Remove prettify
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 8001/8267] bitbake: toaster: Remove prettify
- Date: Sun, 17 Dec 2017 07:02:19 +0000 (UTC)
commit 2c27e3ea04dbd0376db5652a124b3c518ed20699
Author: David Reyna <David Reyna windriver com>
Date: Mon Oct 9 20:31:40 2017 -0700
bitbake: toaster: Remove prettify
Remove "prettify.js" and "prettify.css" due to license issues with Apache2.
Replace with "highlight.pack.js" with its BSD3 License.
[YOCTO #12206]
(Bitbake rev: 6361698819530382541506b06a61f2c76dde59cb)
Signed-off-by: Jason Wessel <jason wessel windriver com>
Signed-off-by: Brian Avery <brian avery intel com>
Signed-off-by: David Reyna <david reyna windriver com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
.../lib/toaster/toastergui/static/css/prettify.css | 1 -
.../toaster/toastergui/static/js/highlight.pack.js | 2 +
.../lib/toaster/toastergui/static/js/libtoaster.js | 6 +---
.../lib/toaster/toastergui/static/js/prettify.js | 28 --------------------
bitbake/lib/toaster/toastergui/templates/base.html | 2 +-
.../toastergui/templates/js-unit-tests.html | 2 +-
6 files changed, 6 insertions(+), 35 deletions(-)
---
diff --git a/bitbake/lib/toaster/toastergui/static/js/highlight.pack.js
b/bitbake/lib/toaster/toastergui/static/js/highlight.pack.js
new file mode 100644
index 0000000..6b45809
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/static/js/highlight.pack.js
@@ -0,0 +1,2 @@
+/*! highlight.js v9.12.0 | BSD3 License | git.io/hljslicense */
+!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof
exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return
n.hljs}))}(function(e){function n(e){return
e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function t(e){return
e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function a(e){return
k.test(e)}function i(e){var n,t,r,i,o=e.className+"
";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return
w(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(i=o[n],a(i)||w(i))return
i}function o(e){var n,t={},r=Array.prototype.slice.call(arguments,1);for(n in e)t[n]=e[n];return
r.forEach(function(e){for(n in e)t[n]=e[n]}),t}function u(e){var n=[];return function r(e,a){for(var
i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),
t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function
c(e,r,a){function i(){return
e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset<r[0].offset?e:r:"start"===r[0].event?e:r:e.length?e:r}function
o(e){function r(e){return"
"+e.nodeName+'="'+n(e.value).replace('"',""")+'"'}s+="<"+t(e)+E.map.call(e.attributes,r).join("")+">"}function
u(e){s+="</"+t(e)+">"}function c(e){("start"===e.event?o:u)(e.node)}for(var
l=0,s="",f=[];e.length||r.length;){var
g=i();if(s+=n(a.substring(l,g[0].offset)),l=g[0].offset,g===e){f.reverse().forEach(u);do
c(g.splice(0,1)[0]),g=i();while(g===e&&g.length&&g[0].offset===l);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return
s+n(a.substr(l))}function l(e){return e.v&&!e.cached_variants&&(e.cached_variants=e.v.map(function(n){return
o(e,{v:null},n)})),e.cached_variants||e.eW&&[o(e)]||[e]}function s(e){function n(e){return
e&&e.source||e}function t(t,r
){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i
diff --git a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js
b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js
index e7d6a95..6f9b5d0 100644
--- a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js
+++ b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js
@@ -546,11 +546,9 @@ $(document).ready(function() {
}
/*
- * PrettyPrint plugin.
- *
+ * highlight plugin.
*/
- // Init
- prettyPrint();
+ hljs.initHighlightingOnLoad();
// Prevent invalid links from jumping page scroll
$('a[href=#]').click(function() {
diff --git a/bitbake/lib/toaster/toastergui/templates/base.html
b/bitbake/lib/toaster/toastergui/templates/base.html
index 0fbe17b..edbd110 100644
--- a/bitbake/lib/toaster/toastergui/templates/base.html
+++ b/bitbake/lib/toaster/toastergui/templates/base.html
@@ -24,7 +24,7 @@
</script>
<script src="{% static 'js/jsrender.min.js' %}">
</script>
- <script src="{% static 'js/prettify.js' %}">
+ <script src="{% static 'js/highlight.pack.js' %}">
</script>
<script src="{% static 'js/libtoaster.js' %}">
</script>
diff --git a/bitbake/lib/toaster/toastergui/templates/js-unit-tests.html
b/bitbake/lib/toaster/toastergui/templates/js-unit-tests.html
index 94ad4f8..ca24896 100644
--- a/bitbake/lib/toaster/toastergui/templates/js-unit-tests.html
+++ b/bitbake/lib/toaster/toastergui/templates/js-unit-tests.html
@@ -14,7 +14,7 @@
<script src="{% static 'js/bootstrap.min.js' %}"></script>
<script src="{% static 'js/filtersnippet.js' %}"></script>
<script src="{% static 'js/importlayer.js' %}"></script>
-<script src="{% static 'js/prettify.js' %}"></script>
+<script src="{% static 'js/highlight.pack.js' %}"></script>
<script src="{% static 'js/layerBtn.js' %}"></script>
<script src="{% static 'js/layerDepsModal.js' %}"></script>
<script src="{% static 'js/projectpage.js' %}"></script>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]