Skip to content

Commit b834000

Browse files
committed
Only look for LGTMs in <p>'s
Fixes: nodejs/node#10657
1 parent 1ffd061 commit b834000

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

review.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@
349349
const href = a.getAttribute('href')
350350
if (!href) continue
351351
const login = href.slice(1).toLowerCase()
352-
const body = comment.querySelector('.comment-body')
353-
if (body && LGTM_RE.test(body.innerHTML)) {
352+
const paragraphs = comment.querySelectorAll('.comment-body > p')
353+
if (Array.from(paragraphs).some(p => LGTM_RE.test(p.innerHTML))) {
354354
revs.push(login)
355355
}
356356
}

0 commit comments

Comments
 (0)