diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-06-24 18:32:15 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-06-24 18:32:15 -0300 |
commit | 7cf907a6b7193eb5dc9e008968367a51807e88a6 (patch) | |
tree | 33d1aec6af20b4735d50e1ca391ec276ad60064f | |
parent | 75a6203e1b765e6be47a6da658977276ee8c2068 (diff) |
st4: hsmusic: r-strings
-rw-r--r-- | apps/Sublime Text 4/Packages/User/HSMusic Editing.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/Sublime Text 4/Packages/User/HSMusic Editing.py b/apps/Sublime Text 4/Packages/User/HSMusic Editing.py index a31cf06..a65c883 100644 --- a/apps/Sublime Text 4/Packages/User/HSMusic Editing.py +++ b/apps/Sublime Text 4/Packages/User/HSMusic Editing.py @@ -189,7 +189,7 @@ def _normalize_region(region): def _match_tag_in_progress(view, region): region = _normalize_region(region) to_start = sublime.Region(view.line(region).a, region.a) - match = re.search('(\[\[(?:(?!]]|\|).)*)$', view.substr(to_start)) + match = re.search(r'(\[\[(?:(?!]]|\|).)*)$', view.substr(to_start)) if match: return match.group(1) @@ -199,13 +199,13 @@ def _match_regex_ahead_same_line(view, region, regex): return re.search(regex, view.substr(to_end)) def _match_rest_of_tag_in_progress(view, region): - regex = '^((?:(?!\[\[).)*]])' + regex = r'^((?:(?!\[\[).)*]])' match = _match_regex_ahead_same_line(view, region, regex) if match: return match.group(1) def _match_through_closing_html_tag(view, region, tag): - regex = f'^(.*?</{tag}>)' + regex = rf'^(.*?</{tag}>)' match = _match_regex_ahead_same_line(view, region, regex) if match: return match.group(1) @@ -218,7 +218,7 @@ def _consider_reference_cycle(view, region, cycle): rest_of_tag = _match_rest_of_tag_in_progress(view, region) - rest_of_ref = re.search('^((?:(?!\|).)*:)', rest_of_tag) + rest_of_ref = re.search(r'^((?:(?!\|).)*:)', rest_of_tag) if rest_of_ref: return ('move', len(rest_of_ref.group(1))) @@ -280,7 +280,7 @@ class ExitWikiTagCommand(_CursorAdaptiveCommand): to_start = sublime.Region(self.view.line(region).a, region.a) to_end = sublime.Region(region.a, self.view.line(region).b) if to_start.a != to_start.b and to_end.a != to_end.b: - match = re.search('.*?([).,:;!?][).,:;!?"\']*|\\s(?=[(\'"])|[\'"](?=\\s|$)|$)', self.view.substr(to_end)) + match = re.search(r'.*?([).,:;!?][).,:;!?"\']*|\\s(?=[(\'"])|[\'"](?=\\s|$)|$)', self.view.substr(to_end)) if match: return ('collapse_move', len(match.group(0))) |