Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
marisks committed Jul 27, 2023
1 parent ad01c7c commit f33fd58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ namespace Geta.Optimizely.Sitemaps.Services
{
public class DefaultUriAugmenterService : IUriAugmenterService
{
public IEnumerable<Uri> GetAugmentUris(IContent content, CurrentLanguageContent languageContentInfo, Uri fullUri)
public IEnumerable<Uri> GetAugmentUris(IContent content, CurrentLanguageContent languageContentInfo, Uri originUri)
{
yield return fullUri;
yield return originUri;
}
}
}
9 changes: 2 additions & 7 deletions src/Geta.Optimizely.Sitemaps/XML/SitemapXmlGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public abstract class SitemapXmlGenerator : ISitemapXmlGenerator

public bool IsDebugMode { get; set; }

private readonly Regex _dashRegex = new Regex("[-]+", RegexOptions.Compiled);
private readonly Regex _dashRegex = new("[-]+", RegexOptions.Compiled, TimeSpan.FromMilliseconds(100));

protected SitemapXmlGenerator(
ISitemapRepository sitemapRepository,
Expand Down Expand Up @@ -193,12 +193,7 @@ protected virtual IEnumerable<XElement> GenerateXmlElements(IEnumerable<ContentR
return Enumerable.Empty<XElement>();
}

if (TryGet<IExcludeFromSitemap>(contentReference, out _))
{
continue;
}

if (ContentReference.IsNullOrEmpty(contentReference))
if (ContentReference.IsNullOrEmpty(contentReference) || TryGet<IExcludeFromSitemap>(contentReference, out _))
{
continue;
}
Expand Down

0 comments on commit f33fd58

Please sign in to comment.