mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-31 23:45:39 +00:00
Gestion des AltName dans les LinkItem
This commit is contained in:
parent
48e1d57560
commit
ffe3f98c55
2 changed files with 26 additions and 0 deletions
|
|
@ -60,6 +60,31 @@ namespace AideDeJeuLib
|
||||||
return;
|
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();
|
enumerator.MoveNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
[][LinkItem]
|
[][LinkItem]
|
||||||
|
|
||||||
## [Barbare]
|
## [Barbare]
|
||||||
|
- AltName: [Barbarian](#)
|
||||||
|
|
||||||
[][LinkItem]
|
[][LinkItem]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue