From aa6f6135d7643dda6f673e16d288d9740a2f2df8 Mon Sep 17 00:00:00 2001 From: Siavash Safi Date: Sun, 31 May 2020 20:56:37 +0200 Subject: [PATCH] Temporary fix for line highlight plugin offset (#40) 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; });