import{getPathPrefix as s,withPathPrefix as n}from"@redocly/theme/core/utils";import{isLocalLink as m}from"../../../../utils/path/is-local-link.js";import{getNodeAttribute as p}from"../../../../markdoc/helpers/get-node-attribute.js";import{setNodeAttributeValue as a}from"../../../../markdoc/helpers/set-node-attribute-value.js";import{resolveLink as l}from"./resolve-link.js";async function v(r,i,o,f){if(await l(r,i,o,f),r.type==="link")return;const e=s();if(!e)return;const t=p(r,i);!t||t==="#"||!m(t)||t.startsWith(e)||a(r,i,t.startsWith("#")?t:n(t))}export{v as resolveNativeMdLink};
