mirror of
https://github.com/HorlogeSkynet/CDNUpdates
synced 2026-11-08 16:00:41 +01:00
Due to Sublime Text v4 new snake case converter, commands require to eventually be renamed. `c_dNUpdates` becomes `cdn_updates`. This change is breaking any other plugin or macro actually using the previous name. Closes: #1
21 lines
634 B
Python
21 lines
634 B
Python
"""CDNUpdates' links finder"""
|
|
|
|
from sublime import IGNORECASE
|
|
|
|
from .constants import LINK_REGEXP_PATTERN
|
|
|
|
|
|
class CheckForLinks: # pylint: disable=too-few-public-methods
|
|
"""
|
|
A simple class to gather the links present within the view.
|
|
"""
|
|
|
|
def __init__(self, view, region_list):
|
|
"""This method gathers URLs present within the sheet calling this plugin"""
|
|
self.view = view
|
|
self.region_list = region_list
|
|
|
|
for region in self.view.find_all(LINK_REGEXP_PATTERN, IGNORECASE):
|
|
# We have to fill the list directly (passed by reference)
|
|
self.region_list.append(region)
|