mirror of
https://github.com/nature-of-code/noc-book-2
synced 2024-11-17 07:49:05 +01:00
highlight the pair that has comment
This commit is contained in:
parent
e15fbbd5eb
commit
fed08c1241
1 changed files with 2 additions and 3 deletions
|
@ -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(' ')}">
|
||||
|
|
Loading…
Reference in a new issue