From 71ad3aab89dac1d526e818d8c3bca93158289a00 Mon Sep 17 00:00:00 2001 From: Siavash Safi Date: Sun, 31 May 2020 20:54:13 +0200 Subject: [PATCH] Temporary fix for line highlight plugin offset Temporary fix for line highlight plugin offset until it's fixed by upstream. Fixes #27 Upstream PR https://github.com/PrismJS/prism/pull/2237 --- src/main/resources/js/prism.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/js/prism.js b/src/main/resources/js/prism.js index f22fc8b..a0322d0 100644 --- a/src/main/resources/js/prism.js +++ b/src/main/resources/js/prism.js @@ -13873,7 +13873,7 @@ Prism.languages.xojo = { var endNode = Prism.plugins.lineNumbers.getLine(pre, end); if (startNode) { - var top = startNode.offsetTop + 'px'; + var top = startNode.offsetTop - offset * lineHeight + 'px'; mutateActions.push(function () { line.style.top = top; });