Skip to content

Commit 12482f2

Browse files
committed
fix: linter warnings
1 parent 6f70933 commit 12482f2

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

core/Util/Util.vala

+11-9
Original file line numberDiff line numberDiff line change
@@ -1098,18 +1098,18 @@ We hope you’ll enjoy using Planify!""");
10981098
var text = escape_text (_text);
10991099

11001100
try {
1101-
Regex mailto_regex = /(?P<mailto>[a-zA-Z0-9\._\%\+\-]+@[a-zA-Z0-9\-\.]+\.[a-zA-Z]+(\S*))/;
1102-
Regex url_regex = /(?P<url>(http|https)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]+(\/\S*))/;
1101+
Regex mailto_regex = /(?P<mailto>[a-zA-Z0-9\._\%\+\-]+@[a-zA-Z0-9\-\.]+\.[a-zA-Z]+(\S*))/; // vala-lint=space-before-paren
1102+
Regex url_regex = /(?P<url>(http|https)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]+(\/\S*))/; // vala-lint=space-before-paren
11031103
Regex url_markdown = new Regex ("\\[([^\\]]+)\\]\\(([^\\)]+)\\)");
11041104

1105-
Regex italic_bold_regex = /\*\*\*(.*?)\*\*\*/;
1106-
Regex bold_regex = /\*\*(.*?)\*\*/;
1107-
Regex italic_regex = /\*(.*?)\*/;
1108-
Regex underline_regex = /_(.*?)_/;
1105+
Regex italic_bold_regex = /\*\*\*(.*?)\*\*\*/; // vala-lint=space-before-paren
1106+
Regex bold_regex = /\*\*(.*?)\*\*/; // vala-lint=space-before-paren
1107+
Regex italic_regex = /\*(.*?)\*/; // vala-lint=space-before-paren
1108+
Regex underline_regex = /_(.*?)_/; // vala-lint=space-before-paren
11091109

1110-
Regex italic_bold_underline_regex = /\*\*\*_([^*]+)_\*\*\*/;
1111-
Regex bold_underline_regex = /\*\*_([^*]+)_\*\*/;
1112-
Regex italic_underline_regex = /\*_(.*?)_\*/;
1110+
Regex italic_bold_underline_regex = /\*\*\*_([^*]+)_\*\*\*/; // vala-lint=space-before-paren
1111+
Regex bold_underline_regex = /\*\*_([^*]+)_\*\*/; // vala-lint=space-before-paren
1112+
Regex italic_underline_regex = /\*_(.*?)_\*/; // vala-lint=space-before-paren
11131113

11141114
MatchInfo info;
11151115

@@ -1132,6 +1132,7 @@ We hope you’ll enjoy using Planify!""");
11321132
if (url_regex.match (text, 0, out info)) {
11331133
do {
11341134
var url = info.fetch_named ("url");
1135+
11351136
if (!url_exists (url, markdown_urls)) {
11361137
urls.append (url);
11371138
}
@@ -1192,6 +1193,7 @@ We hope you’ll enjoy using Planify!""");
11921193
foreach (RegexMarkdown m in markdown_urls) {
11931194
string markdown_text = m.text;
11941195
string markdown_link = m.extra;
1196+
11951197
string urlAsLink = @"<a href=\"$markdown_link\">$markdown_text</a>";
11961198
converted = converted.replace (m.match, urlAsLink);
11971199
}

0 commit comments

Comments
 (0)