« get me outta code hell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
import {isExternalLinkContext} from '#external-links'; export default { extraDependencies: ['html', 'language'], data: (url) => ({url}), slots: { context: { validate: () => isExternalLinkContext, default: 'generic', }, }, generate: (data, slots, {language}) => language.formatExternalLink(data.url, { style: 'handle', context: slots.context, }), };