Skip to content

Commit

Permalink
Only look for LGTMs in <p>'s
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyGu committed Jan 29, 2017
1 parent 1ffd061 commit b834000
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 @@ -349,8 +349,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 b834000

Please sign in to comment.