-
Notifications
You must be signed in to change notification settings - Fork 2
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 strings (not just urls) as input, and remove tracking params on all given links. #3
Comments
This would require a full markdown parser, which is not a problem by itself, but I'm guessing lemmy has to parse it anyways, so doing it twice seems wasteful. |
A markdown parser isn't necessary, you only need to identify and parse links in the given text, and replace them at their positions. Plus you wouldn't even know the format being given to this function anyway. |
Implemented and published in 0.0.2 https://crates.io/crates/clearurls/0.0.2 |
Let me know if you need anything else |
Sweet, thx! |
It'd be hugely helpful to either add, or alter the existing function to be
fn clear_urls(input: &str)
, and step through any number of urls, while ignoring other text.IE say there's a comment with multiple links, and some other text:
The text was updated successfully, but these errors were encountered: