Skip to content

Commit f846126

Browse files
authored
Merge pull request #38876 from benlangmuir/url-search
Fix URL detection for "sip" and "service" schemes
2 parents f1036c2 + c7c899e commit f846126

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/IDE/SyntaxModel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ static const std::vector<std::string> URLProtocols = {
305305
// Use RegexStrURL:
306306
"acap", "afp", "afs", "cid", "data", "fax", "feed", "file", "ftp", "go",
307307
"gopher", "http", "https", "imap", "ldap", "mailserver", "mid", "modem",
308-
"news", "nntp", "opaquelocktoken", "pop", "prospero", "rdar", "rtsp", "service"
308+
"news", "nntp", "opaquelocktoken", "pop", "prospero", "rdar", "rtsp", "service",
309309
"sip", "soap.beep", "soap.beeps", "tel", "telnet", "tip", "tn3270", "urn",
310310
"vemmi", "wais", "xcdoc", "z39.50r","z39.50s",
311311

test/IDE/coloring_comments.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ func test5() -> Int {
7676
// CHECK: <comment-line>// <comment-url>http://whatever.com/what-ever</comment-url></comment-line>
7777
// http://whatever.com/what-ever
7878

79+
// service://example.com
80+
// sip://example.com
81+
// CHECK: <comment-line>// <comment-url>service://example.com</comment-url></comment-line>
82+
// CHECK: <comment-line>// <comment-url>sip://example.com</comment-url></comment-line>
83+
7984
/// Brief.
8085
///
8186
/// Simple case.

0 commit comments

Comments
 (0)