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

Correction parsing rituel/ritual

This commit is contained in:
Yan Maniez 2018-06-26 22:58:06 +02:00
parent c6d9f99c77
commit 6b35d38513
4 changed files with 61 additions and 55 deletions

View file

@ -36,7 +36,7 @@ namespace AideDeJeuLib.Spells
{
System.Diagnostics.Debug.WriteLine(value);
//re = new Regex("level (?<level>\\d) - (?<type>.*?)\\w?(?<rituel>\\(ritual\\))?");
re = new Regex("(?<level>\\d) - (?<type>.*)\\w?(?<rituel>\\(ritual\\))?");
re = new Regex("^(?<level>\\d) - (?<type>.*?)\\s?(?<rituel>\\(ritual\\))?$");
match = re.Match(value);
this.Type = match.Groups["type"].Value;
this.Level = match.Groups["level"].Value;

View file

@ -477,6 +477,13 @@ namespace AideDeJeu.Tools
{
var str = string.Empty;
foreach (var inline in inlines)
{
str += inline.ToMarkdownString();
}
return str;
}
public static string ToMarkdownString(this Markdig.Syntax.Inlines.Inline inline)
{
//Debug.WriteLine(inline.GetType());
string add = string.Empty;
@ -529,10 +536,9 @@ namespace AideDeJeu.Tools
add = inline.ToString();
}
//Debug.WriteLine(add);
str += add;
}
return str;
return add;
}
public static string ToMarkdownString(this Markdig.Syntax.ParagraphBlock paragraphBlock)
{
var str = string.Empty;

View file

@ -132,7 +132,7 @@ namespace AideDeJeu.ViewModels
spell.Type.ToLower().Contains(ecole.ToLower()) &&
spell.Source.Contains(source) &&
spell.Source.Contains(classe) &&
spell.Type.Contains(rituel) &&
spell.Rituel.Contains(rituel) &&
Helpers.RemoveDiacritics(spell.NamePHB).ToLower().Contains(Helpers.RemoveDiacritics(SearchText ?? string.Empty).ToLower());
}).OrderBy(spell => spell.NamePHB)
.AsEnumerable();

View file

@ -1499,7 +1499,7 @@ Si vous lancez ce sort à deux reprises ou plus avant un long repos, il y a 25 %
# Communion avec la nature
- NameVO: [Commune](spells_vo.md#commune) with Nature
- NameVO: [Commune with Nature](spells_vo.md#commune-with-nature)
- CastingTime: 1 minute
- Components: V, S
- Duration: instantanée