(url, includeScheme)
| 8 | export function stripImageTags(s) { return (s || '').replace(/\[Image:\s*source:\s*[^\]]*\]/g, '').trim(); } |
| 9 | |
| 10 | export function formatUrlForDisplay(url, includeScheme) { |
| 11 | const auth = url.username ? `${url.username}${url.password ? `:${url.password}` : ''}@` : ''; |
| 12 | const base = `${auth}${url.host}`; |
| 13 | const path = url.pathname === '/' ? '' : url.pathname; |
| 14 | const prefix = includeScheme ? `${url.protocol}//` : ''; |
| 15 | return `${prefix}${base}${path}${url.search}${url.hash}`; |
| 16 | } |
| 17 | |
| 18 | export function parseServerAddress(input) { |
| 19 | const raw = input.trim(); |
no outgoing calls
no test coverage detected