UNPKG

@nextcloud/vue

Version:
1 lines 1.56 kB
{"version":3,"file":"Linkify-a4db36a9.cjs","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":"+CA6BMA,EAAWC,GACTC,EAAWD,EAAM,CACvB,gBAAiB,QACjB,OAAQ,SACR,UAAW,qBACX,WAAY,CACX,IAAK,8BACL,CACH,CAAE"}