Skip to content

Commit ca1c671

Browse files
committed
review: only look for LGTMs in <p>'s
Fixes: nodejs/node#10657
1 parent 7cf8cc1 commit ca1c671

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
@@ -351,8 +351,8 @@
351351
const href = a.getAttribute('href')
352352
if (!href) continue
353353
const login = href.slice(1).toLowerCase()
354-
const body = comment.querySelector('.comment-body')
355-
if (body && LGTM_RE.test(body.innerHTML)) {
354+
const paragraphs = comment.querySelectorAll('.comment-body > p')
355+
if (Array.from(paragraphs).some(p => LGTM_RE.test(p.innerHTML))) {
356356
revs.push(login)
357357
}
358358
}

0 commit comments

Comments
 (0)