using FluentValidation; using MfGames.Gallium; using Zio; namespace MfGames.Nitride.Markdown; public class IdentifyMarkdownFromPath : IdentifyMarkdown { public IdentifyMarkdownFromPath(IValidator validator) : base(validator) { this.IsMarkdownTest = DefaultIsMarkdown; } private static bool DefaultIsMarkdown( Entity entity, UPath path) { return (path.GetExtensionWithDot() ?? string.Empty).ToLowerInvariant() switch { ".md" => true, ".markdown" => true, _ => false, }; } }