refactor autolink, autolink preview too