This is an automated email from the ASF dual-hosted git repository.

zregvart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 53855ae  chore: remove highlight.js inline initialization
53855ae is described below

commit 53855ae879043ca0ba6cf2a14ae7ae334690e8a7
Author: Zoran Regvart <zregv...@apache.org>
AuthorDate: Thu Jul 11 21:44:06 2019 +0200

    chore: remove highlight.js inline initialization
    
    This removes the inline script used for highlight.js initialization and
    places it in the higlight.js file instead. Having it inline violates
    the CSP and prevents the initialization breaking the source code
    highlight.
---
 antora-ui-camel/src/js/vendor/highlight.js      | 2 ++
 antora-ui-camel/src/partials/footer-scripts.hbs | 1 -
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/antora-ui-camel/src/js/vendor/highlight.js 
b/antora-ui-camel/src/js/vendor/highlight.js
index 0c751ae..31cea97 100644
--- a/antora-ui-camel/src/js/vendor/highlight.js
+++ b/antora-ui-camel/src/js/vendor/highlight.js
@@ -31,3 +31,5 @@ hljs.registerLanguage('sql', 
require('highlight.js/lib/languages/sql'))
 hljs.registerLanguage('swift', require('highlight.js/lib/languages/swift'))
 hljs.registerLanguage('xml', require('highlight.js/lib/languages/xml'))
 hljs.registerLanguage('yaml', require('highlight.js/lib/languages/yaml'))
+
+hljs.initHighlighting()
diff --git a/antora-ui-camel/src/partials/footer-scripts.hbs 
b/antora-ui-camel/src/partials/footer-scripts.hbs
index ea2a658..432bb6f 100644
--- a/antora-ui-camel/src/partials/footer-scripts.hbs
+++ b/antora-ui-camel/src/partials/footer-scripts.hbs
@@ -1,3 +1,2 @@
 <script src="{{uiRootPath}}/js/site.js"></script>
 <script src="{{uiRootPath}}/js/vendor/highlight.js"></script>
-<script>hljs.initHighlighting()</script>

Reply via email to