Make rewrite_urls more precise with regard to backslash removal and support "new" subdomain.
Adjust function description and add another test-case.
Addresses #475 and relates to #281.
So we have tests for both observed breakages now. However, now that I understand a bit more what is going on here, this solution is also far from perfect. It will start breaking again once someone intentionally puts \_ into a comment AFAICT.
The intention of the function is probably to limit the scope of the regex replacement to <a></a> elements. However operating with regexes on HTML is known to be tricky (or "impossible"). I propose we live with this intermediary solution until someone finds another relevant breakage.
Added another commit to support "new.reddit.com"; discovered on r/japan/comments/skbmu8/the_rjapan_basic_questions_thread_february_2022/.
Anything else that is needed here?
Sorry this has been on the backburner. I'm going through outstanding issues and PRs and intend to get to this one soon. Bleiben Sie dran.
Thanks. Looks like this patch still applies cleanly. Don't expect me to be able to explain the regexes after a year though :)