-
Notifications
You must be signed in to change notification settings - Fork 169
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
Handle /c/community@host URLs #583
Handle /c/community@host URLs #583
Conversation
16f7877
to
b287be8
Compare
Also partial fix for #454 |
b287be8
to
c20ef61
Compare
I redid the PR and added some tests. The code is kind of repetitive, but hopefully easy to follow. I'm interested in adding a bunch of tests, so let me know if there's a good reason not to upgrade to JUnit 5, since I may want to do that to get parameterized tests working properly. |
fcb80a4
to
32b56fd
Compare
32b56fd
to
117c58f
Compare
this doesn't seem to cover reddit-style* links like c/[email protected] or u/[email protected] (missing 1st slash), is this intentional? (ok I guess these are all technically "reddit-style" but i think my point gets across) |
Links without the leading / are incorrect on Reddit IIRC (at least on old Reddit), and I personally think they're bad style, so I tried to keep this PR uncontroversial. Also, Jerboa doesn't handle user links anyway, so I figured I'd revisit once it does. It intend to figure out how to do a plugin for the markdown library to get it to process links, and I suppose I can look into that when I do. |
117c58f
to
8b75fd2
Compare
8b75fd2
to
351e981
Compare
351e981
to
1076794
Compare
This is a partial fix to LemmyNet#556, but it at least prevents crashing when an unknown URL type is encountered. There is still some work to do, since the markdown plugin doesn't properly interpret URLs the way we want. User-related parsing still doesn't work because there's work needed in the markdown layer, but once that's done, this should just work as intended.
1076794
to
7bc1030
Compare
50b96c0
to
92abc20
Compare
* Handle more URL types This is a partial fix to LemmyNet#556, but it at least prevents crashing when an unknown URL type is encountered. There is still some work to do, since the markdown plugin doesn't properly interpret URLs the way we want. User-related parsing still doesn't work because there's work needed in the markdown layer, but once that's done, this should just work as intended. * Support http links
This is a partial fix to #556, but it at least prevents crashing when an unknown URL type is encountered. There is still some work to do, since the markdown plugin interprets the following as mailto: urls:
I'm not sure what the supported URL types are intended to be, so I didn't bother implementing a plugin.