Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: condense
Tokenizer#tokenize_urls!
- Extracted `maybe_parse_url` to encapsulate that Strings matched by gsub might not in fact be valid URls. - Condensed the `var = (uri part).to_s; var.tr!()` logic required due to `String#tr!` not returning `self` in case of a no-op to put it in a `tap {}` block instead. I'm not in love with the solution, but it's a minor improvement over the previous one. One line now matches to one part of the url.
- Loading branch information