Avoid null reference exceptions
This commit is contained in:
parent
ea817e4965
commit
18ddbead66
2 changed files with 3 additions and 3 deletions
|
|
@ -90,11 +90,11 @@ namespace Yavsc.Helpers
|
||||||
|
|
||||||
case "AsciiDocNet.TextLiteral":
|
case "AsciiDocNet.TextLiteral":
|
||||||
var tl = elt as 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.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;
|
break;
|
||||||
|
|
||||||
case "AsciiDocNet.Emphasis":
|
case "AsciiDocNet.Emphasis":
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Antiforgery" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Antiforgery" Version="2.2.0" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.2" IncludeAssets="All" />
|
<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" />
|
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.6" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue