mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
Closes: #1793 resolve_url() now checks for local help pages and shortcuts the links that point to them to the local copy. Unit doctests have been included also. Expectations of 2 preexisting tests resulted impacted by the new logic (shortcutted links) and were adapted accordingly. New doctests unveiled some rough edge of the previous logic, so the processing of keyword-protocolled links was fine-tuned to pollish them. Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com> [sunil: Fixed minor indentation, flake8 issues, styling, comments] [sunil: Use file exists checking instead of iterating directory] [sunil: Stricter checking using regex for possible local URLs] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>