routing: handle `#*` links correctly