File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,12 @@ namespace Schema.NET
6
6
public static class Constants
7
7
{
8
8
/// <summary>
9
- /// The HTTPS URL for Schema.org
9
+ /// The HTTPS URL for Schema.org, excluding trailing slash.
10
10
/// </summary>
11
11
public const string HttpsSchemaOrgUrl = "https://schema.org" ;
12
12
13
13
/// <summary>
14
- /// The HTTPS URL for Schema.org
14
+ /// The HTTP URL for Schema.org, excluding trailing slash.
15
15
/// </summary>
16
16
public const string HttpSchemaOrgUrl = "http://schema.org" ;
17
17
}
Original file line number Diff line number Diff line change @@ -64,13 +64,13 @@ public static bool TryParseEnumFromSchemaUri(
64
64
if ( value is not null && value . StartsWith ( Constants . HttpSchemaOrgUrl , StringComparison . OrdinalIgnoreCase ) )
65
65
{
66
66
#pragma warning disable IDE0057 // Use range operator. Need to multi-target.
67
- enumString = value . Substring ( Constants . HttpSchemaOrgUrl . Length ) ;
67
+ enumString = value . Substring ( Constants . HttpSchemaOrgUrl . Length + 1 ) ;
68
68
#pragma warning restore IDE0057 // Use range operator. Need to multi-target.
69
69
}
70
70
else if ( value is not null && value . StartsWith ( Constants . HttpsSchemaOrgUrl , StringComparison . OrdinalIgnoreCase ) )
71
71
{
72
72
#pragma warning disable IDE0057 // Use range operator. Need to multi-target.
73
- enumString = value . Substring ( Constants . HttpsSchemaOrgUrl . Length ) ;
73
+ enumString = value . Substring ( Constants . HttpsSchemaOrgUrl . Length + 1 ) ;
74
74
#pragma warning restore IDE0057 // Use range operator. Need to multi-target.
75
75
}
76
76
else
You can’t perform that action at this time.
0 commit comments