highlight the pair that has comment

This commit is contained in:
Jason Gao 2023-09-20 22:39:45 +08:00
parent e15fbbd5eb
commit fed08c1241

View file

@ -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(
`<div class="${className.join(' ')}">