Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix must have protocol #3

Merged
merged 6 commits into from
Jul 15, 2024
Merged

Fix must have protocol #3

merged 6 commits into from
Jul 15, 2024

Conversation

mayank1513
Copy link
Member

URLs must have protocols, as many parses do not parse <google.com> without the protocol.

As most markdown parses don't parse links without protocols.
Releases:
  react-markdown-autolink@0.0.2
  @repo/shared@0.0.2
@mayank1513 mayank1513 self-assigned this Jul 15, 2024
Copy link

codecov bot commented Jul 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (9df0695) to head (5ff99b1).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main        #3   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines            5         7    +2     
  Branches         2         3    +1     
=========================================
+ Hits             5         7    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

deepsource-io bot commented Jul 15, 2024

Here's the code health analysis summary for commits bda54a0..5ff99b1. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ Success
🎯 2 occurences resolved
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

lib/src/index.ts Outdated
@@ -1,5 +1,5 @@
export const autoLinkMd = (str: string) =>
str.replace(
/((ftp|https?):\/\/)?[\w_-]+(\.[\w_-]+)+[\w@?^=%&\/~+#-.:,]*[\w@?^=%&\/~+#-]/g,
/(ftp|https?):\/\/[\w_-]+(\.[\w_-]+)+[\w@?^=%&\/~+#-.:,]*[\w@?^=%&\/~+#-]|[\w._%+-]+@[\w.-]+\.[a-zA-Z]{2,}/g,

Check warning

Code scanning / CodeQL

Overly permissive regular expression range Medium

Suspicious character range that is equivalent to [#$%&'()*+,-.].
lib/src/index.ts Outdated
);
str
.replace(
/(ftp|https?):\/\/[\w_-]+(\.[\w_-]+)+[\w@?^=%&/~+#-.:,]*[\w@?^=%&/~+#-]/g,

Check warning

Code scanning / CodeQL

Overly permissive regular expression range Medium

Suspicious character range that is equivalent to [#$%&'()*+,-.].
@mayank1513 mayank1513 merged commit 12c695f into main Jul 15, 2024
8 checks passed
@mayank1513 mayank1513 deleted the fix-must-have-protocol branch July 15, 2024 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant