1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-12-25 03:23:45 +00:00
This commit is contained in:
Yan Maniez 2018-08-15 10:29:11 +02:00
parent 5c1bdda78b
commit 9dda5f0eb2
2 changed files with 39 additions and 18 deletions

View file

@ -42,11 +42,21 @@ namespace AideDeJeuLib
var listBlock = block as ListBlock;
if (listBlock.BulletType == '-')
{
foreach (var inblock in listBlock)
{
if (inblock is Markdig.Syntax.ListItemBlock)
{
var listItemBlock = inblock as Markdig.Syntax.ListItemBlock;
foreach (var ininblock in listItemBlock)
{
if (ininblock is Markdig.Syntax.ParagraphBlock)
{
var paragraphBlock = ininblock as Markdig.Syntax.ParagraphBlock;
var str = paragraphBlock.ToMarkdownString();
var regex = new Regex("(?<key>.*?): (?<value>.*)");
var str = block.ToMarkdownString();
var properties = new List<Tuple<string, Action<Generic, string>>>()
{
new Tuple<string, Action<Generic, string>>("- AltName: ", (m, s) =>
new Tuple<string, Action<Generic, string>>("AltName: ", (m, s) =>
{
this.Text += "- " + s; m.AltName = s;
}),
@ -65,6 +75,11 @@ namespace AideDeJeuLib
}
}
}
}
}
}
this.Text += "\n";
}
else
{
this.Text += block.ToMarkdownString();

View file

@ -21,6 +21,12 @@ namespace AideDeJeuLib
}
else
{
regex = new Regex("(?<text>.*?)( \\(SRD p\\d*\\))");
match = regex.Match(AltName ?? string.Empty);
if (!string.IsNullOrEmpty(match.Groups["text"].Value))
{
return match.Groups["text"].Value;
}
return AltName ?? string.Empty;
}
}