Files
CDNUpdates/check_for_links.py
HorlogeSkynet 769b2b7f3a break: renames internal files and commands for OOTB ST3/4 compatibility
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
2026-10-26 22:29:51 +01:00

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)