-
-
Notifications
You must be signed in to change notification settings - Fork 66
Allow dashes according to RFC in all domain parts except TLD #74
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
Allow dashes according to RFC in all domain parts except TLD #74
Conversation
|
So you want this to be the default behaviour? I'm not too familiar with markdown and it's limitiations, so i don't know when a url with multiple dashes would cause trouble.
Thanks, will try to update the code accordingly. |
|
@puzrin on more question, is |
Yes.
If you do exactly as discussed in #63, that will be ok. We already discussed the best possible behaviour. Any deviation will require to do all checks again. |
|
New relaxed rule should touch only domain names (except TLD), and should not touch path. |
|
My fix also allows urls like |
puzrin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please squash everything into single commit.
lib/re.js
Outdated
| // - nobody use those anyway | ||
| '(?:' + re.src_pseudo_letter + '(?:-(?!-)|' + re.src_pseudo_letter + '){0,61}' + re.src_pseudo_letter + ')' + | ||
| '(?:' + re.src_pseudo_letter + '(?:-' + | ||
| '|' + re.src_pseudo_letter + '){0,61}' + re.src_pseudo_letter + ')' + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This 2 lines have broken formatting/indent - not like other code. Please, follow conding style for other parts of file. All you had to do - just remove (?!-) and don't touch anything else.
| % Domains with multiple dashes | ||
| % | ||
|
|
||
| https://5b0ee223b312746c1659db3f--thelounge-chat.netlify.com/docs/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed other samples, discussed in #63.
5b14f2f to
f713fb0
Compare
|
hey @puzrin is anything still blocking you from merging this? |
|
Thanks @Jikstra! Hopefully a package update can be pushed to npm too. |
|
@xPaw no problem, the-lounge seems nice, know some people who are using it. I'm glad i could helped you :) |
Fixes #63