astro-ghostcms/.pnpm-store/v3/files/73/ae3c10ef1e19afc02f801aeeb2d...

17 lines
402 B
Plaintext
Raw Normal View History

2024-02-14 14:10:47 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = getImplicitRoleForAnchor;
var _jsxAstUtils = require("jsx-ast-utils");
/**
* Returns the implicit role for an anchor tag.
*/
function getImplicitRoleForAnchor(attributes) {
if ((0, _jsxAstUtils.getProp)(attributes, 'href')) {
return 'link';
}
return '';
}
module.exports = exports.default;