refactor: collecting inlines for subjects

Instead of checking intersections of inline elements yourself before
adding an inline element, the new class `InlineElementCollector`
prevents intersections internally.

Additionally the inline elements are sorted by the new class, so it's no
longer necessary to do this after adding the inline elements.
This commit is contained in:
Sina Hinderks 2025-06-07 22:02:04 +02:00
parent ba4c0f0cd2
commit ce8ead5124
6 changed files with 109 additions and 79 deletions

View file

@ -121,6 +121,6 @@ namespace SourceGit.Models
public class CommitFullMessage
{
public string Message { get; set; } = string.Empty;
public List<InlineElement> Inlines { get; set; } = [];
public InlineElementCollector Inlines { get; set; } = [];
}
}