Skip to content

Commit 13080af

Browse files
committed
review feedback
1 parent d724d1a commit 13080af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Elastic.Markdown/Myst/Directives/Image/ImageBlock.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public class ImageBlock(DirectiveBlockParser parser, ParserContext context)
6868

6969
public string? Label { get; private set; }
7070

71-
private static readonly string[] AllowedUriList = ["epr.elastic.co"];
71+
private static readonly HashSet<string> AllowedUriHosts = ["epr.elastic.co"];
7272

7373
public override void FinalizeAndValidate(ParserContext context)
7474
{
@@ -100,7 +100,7 @@ private void ExtractImageUrl(ParserContext context)
100100

101101
if (Uri.TryCreate(imageUrl, UriKind.Absolute, out var uri) && uri.Scheme.StartsWith("http"))
102102
{
103-
if (!AllowedUriList.Any(host => uri.Host.Contains(host)))
103+
if (!AllowedUriHosts.Contains(uri.Host))
104104
this.EmitWarning($"{Directive} is using an external URI: {uri} ");
105105

106106
Found = true;

0 commit comments

Comments
 (0)