{"ScriptPreparationCode":"const isURL =\r\n /(https?:\\/\\/)?(www\\.)?([-\\w@:%.\\\\\u002B~#=]{1,256}\\.[a-z]{2,6}|http:\\/\\/localhost:\\d{2,4})\\b([-\\w@:%\\\\\u002B.~#?\u0026/=]*)/;\r\nconst squareBrackets = /\\[([^\\]]\u002B)\\]/;\r\n\r\nconst reg = {\r\n isMarkdownURL: new RegExp(\u0060^${squareBrackets.source}(\\\\(${isURL.source}\\\\))$\u0060),\r\n};\r\n\r\nfunction isMarkdownURL(name) {\r\n // Check before proceeding\r\n if (!name.includes(\u0027[\u0027) || !name.includes(\u0027]\u0027)) return undefined;\r\n\r\n const isURL = name.match(reg.isMarkdownURL);\r\n if (!isURL) return undefined;\r\n\r\n const matchedURL = isURL[2]?.slice(1, isURL[2].length - 1).trim();\r\n if (!matchedURL) return undefined;\r\n\r\n const url = /^https?:\\/\\/|^mailto:/.test(matchedURL) ? matchedURL : \u0060https://\u0060 \u002B matchedURL;\r\n if (!isURL[1]) return undefined;\r\n\r\n return {\r\n name: isURL[1],\r\n url,\r\n };\r\n}\r\n\r\nfunction isMarkdownURL2(name = \u0027\u0027) {\r\n // Check before proceeding\r\n if (!name.includes(\u0027[\u0027) || !name.includes(\u0027]\u0027)) return undefined;\r\n\r\n const isURL = name.match(reg.isMarkdownUrl);\r\n if (!isURL) return undefined;\r\n\r\n const matchedURL = isURL[2]?.slice(1, isURL[2].length - 1).trim();\r\n if (!matchedURL) return undefined;\r\n\r\n const url = /^https?:\\/\\/|^mailto:/.test(matchedURL) ? matchedURL : \u0060https://\u0060 \u002B matchedURL;\r\n if (!isURL[1]) return undefined;\r\n\r\n return {\r\n name: isURL[1],\r\n url,\r\n };\r\n}","TestCases":[{"Name":"1","Code":"isMarkdownURL(\u0027[Testing wiki Resources](https://www.testing.com/support)\u0027)\r\nisMarkdownURL(\u0027[Testing wiki Resources(https://www.testing.com/support)\u0027)\r\nisMarkdownURL(\u0027Testing wiki Resources\u0027)\r\nisMarkdownURL(\u0027Testing wiki [Resources]\u0027)\r\nisMarkdownURL(\u0027A long piece of text goes here\u0027)","IsDeferred":false},{"Name":"2","Code":"isMarkdownURL(\u0027[Testing wiki Resources](https://www.testing.com/support)\u0027)\r\nisMarkdownURL(\u0027[Testing wiki Resources(https://www.testing.com/support)\u0027)\r\nisMarkdownURL(\u0027Testing wiki Resources\u0027)\r\nisMarkdownURL(\u0027Testing wiki [Resources]\u0027)\r\nisMarkdownURL(\u0027A long piece of text goes here\u0027)","IsDeferred":false}]}