@nextcloud/vue
Version:
Nextcloud vue components
1 lines • 1.58 kB
Source Map (JSON)
{"version":3,"file":"Linkify-a0faf443.mjs","sources":["../../src/utils/Linkify.js"],"sourcesContent":["/**\n * @copyright Copyright (c) 2021 Raimund Schlüßler <raimund.schluessler@mailbox.org>\n *\n * @author Raimund Schlüßler <raimund.schluessler@mailbox.org>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport linkifyStr from 'linkify-string'\n\n/**\n * Linkify text\n *\n * @param {string} text The text to linkify\n * @return {string} The linkified string\n */\nconst Linkify = (text) => {\n\treturn linkifyStr(text, {\n\t\tdefaultProtocol: 'https',\n\t\ttarget: '_blank',\n\t\tclassName: 'external linkified',\n\t\tattributes: {\n\t\t\trel: 'nofollow noopener noreferrer',\n\t\t},\n\t})\n}\n\nexport default Linkify\n"],"names":["Linkify","text","linkifyStr"],"mappings":";AA6BK,MAACA,IAAWC,CAAAA,MACTC,EAAWD,GAAM,EACvB,iBAAiB,SACjB,QAAQ,UACR,WAAW,sBACX,YAAY,EACX,KAAK,+BACL,EACH,CAAE;"}