Skip to content

Commit

Permalink
[.NET] Updates to dotnet dependencies (#3231)
Browse files Browse the repository at this point in the history
Switch to public version of MarkedNet
Verified by running tests as well as HTML sample app
  • Loading branch information
paulcam206 authored Jul 17, 2019
1 parent 0f85ebc commit 1974570
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net4.5.2;netstandard1.3;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net4.5.2;netstandard2.0</TargetFrameworks>
<Authors>Microsoft</Authors>
<Summary>Adaptive Card renderer for generating HTML tags</Summary>
<Description>This library provides the ability to render an Adaptive Card into HTML, typically used for server-side card rendering</Description>
Expand All @@ -17,7 +17,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.MarkedNet" Version="1.0.13" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="System.Reflection" Version="4.3.0" />
</ItemGroup>
Expand All @@ -27,9 +26,18 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="MarkedNet">
<Version>2.1.2</Version>
</PackageReference>
<PackageReference Include="System.Reflection.TypeExtensions">
<Version>4.4.0</Version>
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net4.5.2'">
<PackageReference Include="MarkedNet">
<Version>2.1.2</Version>
</PackageReference>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using Microsoft.MarkedNet;
using MarkedNet;

namespace AdaptiveCards.Rendering.Html
{
Expand All @@ -17,6 +17,7 @@ public static IEnumerable<HtmlTag> Convert(string markdown)
marked.Options.Mangle = false;
marked.Options.Sanitize = true;
marked.Options.XHtml = true;
marked.Options.ExternalLinks = false;

var rawXhtml = marked.Parse(markdown);
var root = XElement.Parse($"<root>{rawXhtml}</root>");
Expand Down
1 change: 0 additions & 1 deletion source/dotnet/Samples/AdaptiveCards.Sample.Html/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ static int Main(string[] args)
}
catch (Exception err)
{
Debugger.Break();
writer.WriteLine($"<p class='error'>ERROR: {err.Message}</p>");
}
}
Expand Down

0 comments on commit 1974570

Please sign in to comment.