(element: Element)
| 35 | const LOC_ATTR_REGEX_UNIX = /^((?:(?:\.\/|\.\.\/|\/)?(?:\.?\w+\/)*)(?:\.?\w+\.?\w+)):([0-9]+):([0-9]+)$/ |
| 36 | |
| 37 | export function getLocationAttr(element: Element): LocationAttr | null { |
| 38 | |
| 39 | let attr = element.getAttribute(LOCATION_ATTRIBUTE_NAME) |
| 40 | if (!attr) return null |
| 41 | |
| 42 | let is_windows = /(win32|win64|windows|wince)/i.test(navigator.userAgent) |
| 43 | let regex = is_windows ? LOC_ATTR_REGEX_WIN : LOC_ATTR_REGEX_UNIX |
| 44 | return regex.test(attr) ? attr as LocationAttr : null |
| 45 | } |
| 46 | |
| 47 | function getTargetURL(target: TargetIDE | TargetURLFunction, data: SourceCodeData): string | void { |
| 48 |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…