inlining the process_markup method in LinkChecker