YaeBlog/YaeBlog/Extensions/AngleSharpExtensions.cs
jackfiled 2b9c374e8c
All checks were successful
Build blog docker image / Build-Blog-Image (push) Successful in 3m25s
feat: beatify the blog content.
Remove some unused font files and upgrade tailwindcss to v4.0.0.
2025-03-22 17:34:43 +08:00

19 lines
386 B
C#

using AngleSharp.Dom;
namespace YaeBlog.Extensions;
public static class AngleSharpExtensions
{
public static IEnumerable<IElement> EnumerateParentElements(this IElement element)
{
IElement? e = element.ParentElement;
while (e is not null)
{
IElement c = e;
e = e.ParentElement;
yield return c;
}
}
}