From fed08c1241a21ade8006a1f3355ba16b33579f73 Mon Sep 17 00:00:00 2001 From: Jason Gao Date: Wed, 20 Sep 2023 22:39:45 +0800 Subject: [PATCH] highlight the pair that has comment --- magicbook/plugins/codesplit.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/magicbook/plugins/codesplit.js b/magicbook/plugins/codesplit.js index e0f5f23..54d76bc 100644 --- a/magicbook/plugins/codesplit.js +++ b/magicbook/plugins/codesplit.js @@ -99,9 +99,8 @@ Plugin.prototype = { '\n'; const className = pair.className.concat('pair'); - // highlight the pair that has both code and comment - if (pair.comment.length > 0 && pair.code.length > 0) - className.push('highlight'); + // highlight the pair that has comment + if (pair.comment.length > 0) className.push('highlight'); $('.pairs').append( `