import { toString } from "../../../mdast-util-to-string/lib/index.js";
function formatLinkAsAutolink(t, n) {
	let r = toString(t);
	return !!(!n.options.resourceLink && t.url && !t.title && t.children && t.children.length === 1 && t.children[0].type === "text" && (r === t.url || "mailto:" + r === t.url) && /^[a-z][a-z+.-]+:/i.test(t.url) && !/[\0- <>\u007F]/.test(t.url));
}
export { formatLinkAsAutolink };
