Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
reakaleek committed Jan 10, 2025
1 parent de786fc commit 744b138
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Elastic.Markdown/Diagnostics/DiagnosticsChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public virtual async Task StopAsync(CancellationToken cancellationToken)
await Channel.Reader.Completion;
}

public void EmitExternalLink(string link) => CrossLinks.TryAdd(link, true);
public void EmitCrossLink(string link) => CrossLinks.TryAdd(link, true);

public void EmitError(string file, string message, Exception? e = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public override bool Match(InlineProcessor processor, ref StringSlice slice)
var column = link.Column;
var length = url?.Length ?? 1;

if (IsExternalLink(uri))
processor.GetContext().Build.Collector.EmitExternalLink(url!);
if (IsCrossLink(uri))
processor.GetContext().Build.Collector.EmitCrossLink(url!);

var context = processor.GetContext();
if (processor.GetContext().SkipValidation)
Expand Down Expand Up @@ -133,7 +133,7 @@ public override bool Match(InlineProcessor processor, ref StringSlice slice)
return match;
}

private static bool IsExternalLink(Uri? uri) =>
private static bool IsCrossLink(Uri? uri) =>
uri != null
&& !ExcludedSchemes.Contains(uri.Scheme)
&& !uri.IsFile
Expand Down

0 comments on commit 744b138

Please sign in to comment.