Public Access
Normalize scalar frontmatter lists
PR and Push Build/Test / build-and-test (push) Successful in 8m49s
PR and Push Build/Test / build-and-test (push) Successful in 8m49s
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