1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-10-30 06:56:10 +00:00

Gestion des AltName dans les LinkItem

This commit is contained in:
Yan Maniez 2018-07-22 15:29:24 +02:00
parent 48e1d57560
commit ffe3f98c55
2 changed files with 26 additions and 0 deletions

View file

@ -60,6 +60,31 @@ namespace AideDeJeuLib
return;
}
}
else if (block is ListBlock)
{
var listBlock = block as ListBlock;
if (listBlock.BulletType == '-')
{
var regex = new Regex("(?<key>.*?): (?<value>.*)");
var str = block.ToMarkdownString();
var properties = new List<Tuple<string, Action<LinkItem, string>>>()
{
new Tuple<string, Action<LinkItem, string>>("- AltName: ", (m, s) =>
{
m.AltName = s;
})
};
foreach (var property in properties)
{
if (str.StartsWith(property.Item1))
{
property.Item2.Invoke(this, str.Substring(property.Item1.Length));
break;
}
}
}
}
enumerator.MoveNext();
}
}

View file

@ -5,6 +5,7 @@
[][LinkItem]
## [Barbare]
- AltName: [Barbarian](#)
[][LinkItem]