1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-12-20 17:13:31 +00:00

Ajustements

This commit is contained in:
Yan Maniez 2018-10-06 22:53:50 +02:00
parent 9a74bba567
commit 6e452d91e8
4 changed files with 11 additions and 7 deletions

View file

@ -469,11 +469,11 @@
foreach (Markdig.Extensions.Tables.TableRow row in tableBlock)
{
maxColumns = Math.Max(maxColumns, row.Count);
grid.RowDefinitions.Add(new RowDefinition { Height= GridLength.Auto });
grid.RowDefinitions.Add(new RowDefinition { Height= new GridLength(1, GridUnitType.Auto) });
}
for (int i = 0; i < maxColumns; i++)
{
grid.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto });
grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Auto) });
}

View file

@ -88,13 +88,17 @@ namespace AideDeJeu.ViewModels
{
if (currentItem.GetNewFilterViewModel() == null)
{
var name = subItem.Name;
var level = Math.Max(1, Math.Min(6, subItem.NameLevel));
currentItem.Markdown += $"\n\n{new String('#', level)} [{subItem.Name}]({(subItem is LinkItem ? (subItem as LinkItem).Link : subItem.Id)})\n\n";
var link = (subItem is LinkItem ? (subItem as LinkItem).Link : subItem.Id);
currentItem.Markdown += $"\n\n{new String('#', level)} [{name}]({link})";
if(!string.IsNullOrEmpty(subItem.AltNameText))
{
var altname = subItem.AltNameText;
var altlevel = Math.Max(1, Math.Min(6, subItem.NameLevel + 2));
currentItem.Markdown += $"{new String('#', altlevel)} {subItem.AltNameText}\n\n";
currentItem.Markdown += $"\n\n{new String('#', altlevel)} _[{altname}]({link})_";
}
currentItem.Markdown += "\n\n";
}
else
{