From dff84209f0abb3446842e9d211ab9eb04ba98886 Mon Sep 17 00:00:00 2001 From: renovate Date: Sun, 30 May 2021 10:12:59 +0000 Subject: [PATCH] Update dependency highlight.js to v11 (#527) Co-authored-by: kolaente Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/527 Co-authored-by: renovate Co-committed-by: renovate --- package.json | 2 +- src/components/input/editor.vue | 4 ++-- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index b12fef38e..2140eef91 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "copy-to-clipboard": "3.3.1", "date-fns": "2.22.1", "dompurify": "2.2.8", - "highlight.js": "10.7.2", + "highlight.js": "11.0.0", "lodash": "4.17.21", "marked": "2.0.6", "register-service-worker": "1.7.2", diff --git a/src/components/input/editor.vue b/src/components/input/editor.vue index 083776c4c..d016466d3 100644 --- a/src/components/input/editor.vue +++ b/src/components/input/editor.vue @@ -369,7 +369,7 @@ export default { highlight: function (code, language) { const hljs = require('highlight.js') const validLanguage = hljs.getLanguage(language) ? language : 'plaintext' - return hljs.highlight(validLanguage, code).value + return hljs.highlight(code, {language: validLanguage}).value }, }) @@ -448,7 +448,7 @@ export default {