(view, path=False)
| 220 | |
| 221 | |
| 222 | def select_urls(view, path=False): |
| 223 | pattern = r'https?://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]' |
| 224 | regions = view.find_all(pattern, sublime.IGNORECASE) |
| 225 | |
| 226 | array = [] |
| 227 | for region in regions: |
| 228 | text = view.substr(region) |
| 229 | if path == False: |
| 230 | text = delete_url_path(text) |
| 231 | if text not in array: |
| 232 | array.append(text) |
| 233 | |
| 234 | text = '\n'.join(array) |
| 235 | return text |
| 236 | |
| 237 | |
| 238 | def exec_command(cmd): |
no test coverage detected