Avoid null reference exceptions
This commit is contained in:
@ -90,11 +90,11 @@ namespace Yavsc.Helpers
|
||||
|
||||
case "AsciiDocNet.TextLiteral":
|
||||
var tl = elt as TextLiteral;
|
||||
if (tl.Attributes.Anchor!=null)
|
||||
if (tl?.Attributes.Anchor!=null)
|
||||
{
|
||||
sb.AppendFormat("<a name=\"{0}\">{1}</a> ", tl.Attributes.Anchor.Id, tl.Attributes.Anchor.XRefLabel);
|
||||
}
|
||||
sb.Append(tl.Text);
|
||||
if (tl!=null) sb.Append(tl.Text);
|
||||
break;
|
||||
|
||||
case "AsciiDocNet.Emphasis":
|
||||
|
@ -42,7 +42,7 @@
|
||||
<PackageReference Include="Microsoft.AspNetCore.Antiforgery" Version="2.2.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.2" IncludeAssets="All" />
|
||||
<PackageReference Include="AsciiDocNet" Version="1.0.0" />
|
||||
<PackageReference Include="AsciiDocNet" Version="1.0.0-alpha6" />
|
||||
|
||||
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.6" />
|
||||
</ItemGroup>
|
||||
|
Reference in New Issue
Block a user