Skip to content

Commit

Permalink
review: only look for LGTMs in <p>'s
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyGu committed Feb 1, 2017
1 parent 7cf8cc1 commit ca1c671
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions review.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@
const href = a.getAttribute('href')
if (!href) continue
const login = href.slice(1).toLowerCase()
const body = comment.querySelector('.comment-body')
if (body && LGTM_RE.test(body.innerHTML)) {
const paragraphs = comment.querySelectorAll('.comment-body > p')
if (Array.from(paragraphs).some(p => LGTM_RE.test(p.innerHTML))) {
revs.push(login)
}
}
Expand Down

0 comments on commit ca1c671

Please sign in to comment.