Comments (10)
Thanks for report and clear sample.
See
Lines 104 to 106 in cbc0833
from linkify-it.
Looks like there are a couple of places where there's URL restrictions due to markdown. Sounds like a good idea to be able to disable all these markdown restrictions.
from linkify-it.
After thinking a bit... no options needed. Two dashes should just work, according to RFC.
I can't promiss to make this soon, but PR will be accepted without delay.
from linkify-it.
Would it be just removing these lines? Which it seems to become same regex as src_domain_root
Lines 103 to 107 in cbc0833
It's a bit hard to tell from just looking at the code.
from linkify-it.
No, src_domain_root
(top level domain) does not allow dashes at all. This line should exist, but be more clever. I can't say more immediately. Those regexes are mad even with comments :)
from linkify-it.
For info: There are domains with two dashes too: www.a--b.com www.c--u.com
Or even three dashes: http://a---b.com/
from linkify-it.
That's not TLD-s. TLD-s are .com
, .eu
etc.
from linkify-it.
Yeah my bad.
from linkify-it.
Nevermind, i think we understand each other. Fixed rule should be "allow dashes according to RFC in all domain parts except TLD".
from linkify-it.
@puzrin, is there any chance you could take a look at this?
We switched to linkify-it (in thelounge/thelounge#2397) a few months back, and about to release a new major version of our project, it would be so nice if this was fixed :)
from linkify-it.
Related Issues (20)
- url not matched when it contains `...:` HOT 2
- options to escape a particular link? HOT 1
- Schema keys are case-insensitive, but only in one direction? HOT 3
- Add .app TLD to tlds_default HOT 6
- Parsed incorrectly when the link ends with the closing parenthesis in Chinese
- Colon after URL is included into URL, when using markdown-it with `linkify: true` HOT 1
- How to return 0 in the validate function ? HOT 1
- Links preceded by emojis are not rendered
- Router admin login IP disclosed in source code HOT 1
- Error: Namespace 'LinkifyIt' has no exported member 'LinkifyIt' HOT 2
- Change default protocol in fuzzyLink option
- Doesn't seem to support domain-specific rules HOT 1
- Inconsistent link recognition when wrapped within html element HOT 2
- Matching URL's that contain spaces %20 HOT 2
- url with !! is not detected correctly HOT 1
- Email links followed by a hyphen are not detected HOT 5
- URLs with period and parantheses stop before closing parentheses HOT 3
- Links with "_" in the domain name are not regarded as links HOT 2
- Links that are containing '?' are not detected HOT 1
- Links with slashes capturing trailing semicolons HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linkify-it.