Closed sbrudz closed 3 years ago
Packaged version of the extension to help with testing:
Looking good! -Tami @tamireiss / tamireiss.com
On Tue, May 18, 2021 at 3:13 PM Steve Brudz @.***> wrote:
Packaged version of the extension to help with testing:
just-not-sorry-chrome.zip https://github.com/defmethodinc/just-not-sorry/files/6503712/just-not-sorry-chrome.zip
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/defmethodinc/just-not-sorry/pull/124#issuecomment-843462474, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMWI53NIIS5K3FTK2EI2ADTOK357ANCNFSM45DDOYBQ .
:tada: This PR is included in version 2.0.0-beta.8 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
:tada: This PR is included in version 2.1.0-beta.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
:tada: This PR is included in version 2.1.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
As reported in issue #117, the highlighting was not appearing in certain situations. For example, if a warning phrase was on a line by itself. This issue is due to the way the match utility finds the matches.
For example, when the email DOM text looks like this:
Both instances "sorry" should be highlighted, but only the first one was being highlighted. I tracked it down to this line in util.js. When we call
el.textContent
, the resulting string is "sorry checkingsorry" and the regular expression match for sorry,\b(sorry)\b
doesn't pick up the second one.I tried several approaches to fixing this issue, but none of them worked.
In the end, I realized that a simple fix would be to loosen the regular expressions so that word boundaries aren't required. This seems to work well. The one case where I kept a word boundary in place was for "just", since I didn't want "justified" to be partially highlighted.
I also added "we believe" and "we feel" to the warning list, per Tami's request.
Fixes #117