mlomb / chat-analytics

Generate interactive, beautiful and insightful chat analysis reports
https://chatanalytics.app
GNU Affero General Public License v3.0
711 stars 51 forks source link

Replaced URL regex with the one used by Discord #72

Closed hopperelec closed 1 year ago

hopperelec commented 1 year ago

This regex is simpler and more lenient, and will perfectly match anything highlighted blue within Discord (some other platforms seem to be even more lenient than this, not even requiring http(s), which seems a bit over-the-top)

Fixes https://github.com/mlomb/chat-analytics/issues/71#issuecomment-1485946551

github-actions[bot] commented 1 year ago

⚡ Preview for this PR: https://pr-72.chat-analytics.pages.dev 📊 Demo

codecov[bot] commented 1 year ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (de8c517) 74.08% compared to head (bd0dc6c) 74.08%.

:exclamation: Current head bd0dc6c differs from pull request most recent head 7945eb4. Consider uploading reports for the commit 7945eb4 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #72 +/- ## ======================================= Coverage 74.08% 74.08% ======================================= Files 55 55 Lines 2257 2257 Branches 497 497 ======================================= Hits 1672 1672 Misses 537 537 Partials 48 48 ``` | [Impacted Files](https://codecov.io/gh/mlomb/chat-analytics/pull/72?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mart%C3%ADn+Lombardo) | Coverage Δ | | |---|---|---| | [pipeline/process/nlp/Tokenizer.ts](https://codecov.io/gh/mlomb/chat-analytics/pull/72?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mart%C3%ADn+Lombardo#diff-cGlwZWxpbmUvcHJvY2Vzcy9ubHAvVG9rZW5pemVyLnRz) | `100.00% <ø> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mart%C3%ADn+Lombardo). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mart%C3%ADn+Lombardo)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

hopperelec commented 1 year ago

I'm confused why the code coverage changes so much, or even at all?

mlomb commented 1 year ago

I'm not sure why the coverage did that 🤔 We should add tests to be sure the regex is working properly and to prevent regressions in the future. I'll add some later

mlomb commented 1 year ago

It seems that the branch was in an old commit, I merged main to the PR. It should fix the coverage issue

hopperelec commented 1 year ago

Ohh, I updated the Git branch in my IDE, but forgot that it was fetching it from my fork of it which I hadn't synced on GitHub

mlomb commented 1 year ago

I added a few tests, we can merge this :)