mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-11-01 16:05:42 +00:00
Gestion des images en markdown
This commit is contained in:
parent
7aeb7eeb7f
commit
e0c3937f95
2 changed files with 21 additions and 11 deletions
|
|
@ -109,9 +109,6 @@
|
||||||
<AppxManifest Include="Package.appxmanifest">
|
<AppxManifest Include="Package.appxmanifest">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</AppxManifest>
|
</AppxManifest>
|
||||||
<EmbeddedResource Include="..\..\Data\database.db">
|
|
||||||
<Link>Assets\database.db</Link>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<None Include="AideDeJeu.UWP_StoreKey.pfx" />
|
<None Include="AideDeJeu.UWP_StoreKey.pfx" />
|
||||||
<None Include="AideDeJeu.UWP_TemporaryKey.pfx" />
|
<None Include="AideDeJeu.UWP_TemporaryKey.pfx" />
|
||||||
<Content Include="Assets\Fonts\LinLibertine_R.ttf" />
|
<Content Include="Assets\Fonts\LinLibertine_R.ttf" />
|
||||||
|
|
|
||||||
|
|
@ -234,7 +234,7 @@ namespace AideDeJeu.Tools
|
||||||
}
|
}
|
||||||
if (headingBlock.HeaderChar == '#' && headingBlock.Level == 2)
|
if (headingBlock.HeaderChar == '#' && headingBlock.Level == 2)
|
||||||
{
|
{
|
||||||
switch(headingBlock.Inline.ToContainerString())
|
switch (headingBlock.Inline.ToContainerString())
|
||||||
{
|
{
|
||||||
case "Capacités":
|
case "Capacités":
|
||||||
case "Special Features":
|
case "Special Features":
|
||||||
|
|
@ -372,9 +372,9 @@ namespace AideDeJeu.Tools
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
foreach(var property in properties)
|
foreach (var property in properties)
|
||||||
{
|
{
|
||||||
if(str.StartsWith(property.Item1))
|
if (str.StartsWith(property.Item1))
|
||||||
{
|
{
|
||||||
property.Item2.Invoke(monster, str.Substring(property.Item1.Length));
|
property.Item2.Invoke(monster, str.Substring(property.Item1.Length));
|
||||||
break;
|
break;
|
||||||
|
|
@ -407,7 +407,7 @@ namespace AideDeJeu.Tools
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(block is Markdig.Extensions.Tables.Table)
|
else if (block is Markdig.Extensions.Tables.Table)
|
||||||
{
|
{
|
||||||
var tableBlock = block as Markdig.Extensions.Tables.Table;
|
var tableBlock = block as Markdig.Extensions.Tables.Table;
|
||||||
var table = tableBlock.ToTable();
|
var table = tableBlock.ToTable();
|
||||||
|
|
@ -430,17 +430,25 @@ namespace AideDeJeu.Tools
|
||||||
monster.Charisma = table["CHA"].FirstOrDefault();
|
monster.Charisma = table["CHA"].FirstOrDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(block is Markdig.Syntax.LinkReferenceDefinitionGroup)
|
else if (block is Markdig.Syntax.LinkReferenceDefinitionGroup)
|
||||||
{
|
{
|
||||||
|
|
||||||
var linkReferenceDefinitionGroup = block as Markdig.Syntax.LinkReferenceDefinitionGroup;
|
var linkReferenceDefinitionGroup = block as Markdig.Syntax.LinkReferenceDefinitionGroup;
|
||||||
|
|
||||||
foreach (var linkBlock in linkReferenceDefinitionGroup)
|
foreach (var linkBlock in linkReferenceDefinitionGroup)
|
||||||
{
|
{
|
||||||
var linkReferenceDefinition = linkBlock as Markdig.Syntax.LinkReferenceDefinition;
|
var linkReferenceDefinition = linkBlock as Markdig.Syntax.LinkReferenceDefinition;
|
||||||
//linkReferenceDefinition.
|
//linkReferenceDefinition.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (block is Markdig.Syntax.LinkReferenceDefinition)
|
||||||
|
{
|
||||||
|
Debug.WriteLine(block.GetType());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.WriteLine(block.GetType());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (monster != null)
|
if (monster != null)
|
||||||
{
|
{
|
||||||
|
|
@ -487,7 +495,12 @@ namespace AideDeJeu.Tools
|
||||||
else if (inline is Markdig.Syntax.Inlines.LinkInline)
|
else if (inline is Markdig.Syntax.Inlines.LinkInline)
|
||||||
{
|
{
|
||||||
var linkInline = inline as Markdig.Syntax.Inlines.LinkInline;
|
var linkInline = inline as Markdig.Syntax.Inlines.LinkInline;
|
||||||
add = string.Format($"[{linkInline.Label}]({linkInline.Url} \"{linkInline.Title}\")", linkInline.Label); //containerInline.ToContainerString();
|
add = string.Empty;
|
||||||
|
if (linkInline.IsImage)
|
||||||
|
{
|
||||||
|
add = "!";
|
||||||
|
}
|
||||||
|
add += string.Format($"[{linkInline.Label}]({linkInline.Url} \"{linkInline.Title}\")", linkInline.Label); //containerInline.ToContainerString();
|
||||||
}
|
}
|
||||||
else if (inline is Markdig.Syntax.Inlines.ContainerInline)
|
else if (inline is Markdig.Syntax.Inlines.ContainerInline)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue