forked from Manuel/meeting-assistant
Normalize scalar frontmatter lists
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using YamlDotNet.Serialization;
|
||||
using YamlDotNet.Serialization.NamingConventions;
|
||||
|
||||
namespace MeetingAssistant.MeetingNotes;
|
||||
|
||||
internal static class FrontmatterYamlDeserializer
|
||||
{
|
||||
public static IDeserializer Create()
|
||||
{
|
||||
return new DeserializerBuilder()
|
||||
.WithTypeConverter(new ScalarStringListYamlTypeConverter())
|
||||
.IgnoreUnmatchedProperties()
|
||||
.Build();
|
||||
}
|
||||
|
||||
public static IDeserializer CreateWithUnderscoredNaming()
|
||||
{
|
||||
return new DeserializerBuilder()
|
||||
.WithNamingConvention(UnderscoredNamingConvention.Instance)
|
||||
.WithTypeConverter(new ScalarStringListYamlTypeConverter())
|
||||
.IgnoreUnmatchedProperties()
|
||||
.Build();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user