mirror of
https://github.com/xoofx/markdig.git
synced 2026-11-16 09:20:40 +00:00
Enable nullable on AutolinkInline
This commit is contained in:
@@ -35,10 +35,9 @@ namespace Markdig.Parsers.Inlines
|
||||
int column;
|
||||
if (LinkHelper.TryParseAutolink(ref slice, out string? link, out bool isEmail))
|
||||
{
|
||||
processor.Inline = new AutolinkInline()
|
||||
processor.Inline = new AutolinkInline(url: link)
|
||||
{
|
||||
IsEmail = isEmail,
|
||||
Url = link,
|
||||
Span = new SourceSpan(processor.GetSourcePosition(saved.Start, out line, out column), processor.GetSourcePosition(slice.Start - 1)),
|
||||
Line = line,
|
||||
Column = column
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
// This file is licensed under the BSD-Clause 2 license.
|
||||
// See the license.txt file in the project root for more information.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Markdig.Syntax.Inlines
|
||||
@@ -13,8 +11,13 @@ namespace Markdig.Syntax.Inlines
|
||||
/// </summary>
|
||||
/// <seealso cref="LeafInline" />
|
||||
[DebuggerDisplay("<{Url}>")]
|
||||
public class AutolinkInline : LeafInline
|
||||
public sealed class AutolinkInline : LeafInline
|
||||
{
|
||||
public AutolinkInline(string url)
|
||||
{
|
||||
Url = url;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is an email link.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user