UNPKG

@wordpress/block-library

Version:
1 lines • 586 B
{"version":3,"file":"remove-anchor-tag.mjs","names":[],"sources":["../../src/utils/remove-anchor-tag.js"],"sourcesContent":["/**\n * Removes anchor tags from a string.\n *\n * @param {string} value The value to remove anchor tags from.\n *\n * @return {string} The value with anchor tags removed.\n */\nexport default function removeAnchorTag( value ) {\n\t// To do: Refactor this to use rich text's removeFormat instead.\n\treturn value.toString().replace( /<\\/?a[^>]*>/g, '' );\n}\n"],"mappings":";;;;;;;;AAOA,SAAwB,gBAAiB,OAAQ;CAEhD,OAAO,MAAM,SAAS,CAAC,CAAC,QAAS,gBAAgB,EAAG;AACrD"}