/// <summary> /// Initializes a new instance of <see cref="MdStrongEmphasisSpan"/> with the specified content. /// </summary> /// <param name="text">The text to emphasize</param> public MdStrongEmphasisSpan(MdSpan text) =>
/// <summary> /// Initializes a new instance of <see cref="MdImageSpan"/>. /// </summary> /// <param name="description">The image's description</param> /// <param name="uri">The image's uri. Value must be a valid absolute or relative <see cref="System.Uri"/></param> public MdImageSpan(MdSpan description, string uri) : this(description, new Uri(uri, UriKind.RelativeOrAbsolute)) { }
/// <summary> /// Initializes a new instance of <see cref="MdImageSpan"/>. /// </summary> /// <param name="description">The image's description</param> /// <param name="uri">The image's uri</param> public MdImageSpan(MdSpan description, Uri uri) { Description = description ?? throw new ArgumentNullException(nameof(description)); Uri = uri ?? throw new ArgumentNullException(nameof(uri)); }
/// <summary> /// Initializes a new instance of <see cref="MdEmphasisSpan"/> with the specified content. /// </summary> /// <param name="text">The text to emphasize.</param> public MdEmphasisSpan(MdSpan text) { Text = text ?? throw new ArgumentNullException(nameof(text)); }
// private protected constructor => class cannot be derived from outside this assembly private protected MdListItemBase(MdSpan content) : this(new MdParagraph(content)) { }
/// <summary> /// Creates a new instance of <see cref="MdParagraph"/> with the specified content. /// </summary> /// <param name="text">The paragraph's content</param> public static MdParagraph Paragraph(MdSpan text) => new MdParagraph(text !);
/// <summary> /// Initializes a new instance of <see cref="MdSingleLineSpan"/>. /// </summary> /// <param name="content">The spans content</param> public MdSingleLineSpan(MdSpan content) =>
/// <summary> /// Creates a new instance of <see cref="MdHeading"/> /// </summary> /// <param name="text">The text of the heading. Must not be null.</param> /// <param name="level">The heading's level. Value must be in the range [1,6]</param> public static MdHeading Heading(MdSpan text, int level) => new MdHeading(text, level);
/// <summary> /// Creates a new instance of <see cref="MdHeading"/> /// </summary> /// <param name="level">The heading's level. Value must be in the range [1,6]</param> /// <param name="text">The text of the heading. Must not be null.</param> public static MdHeading Heading(int level, MdSpan text) => new MdHeading(level, text);
/// <summary> /// Creates a new instance of <see cref="MdBlockQuote"/> with the specified content /// </summary> /// <param name="content"> /// The content of the quote as a span (see <see cref="MdSpan"/>. /// The span will automatically be wrapped in an instance of <see cref="MdParagraph"/> /// </param> public static MdBlockQuote BlockQuote(MdSpan content) => new MdBlockQuote(content);
/// <summary> /// Creates a new instance of <see cref="MdListItem"/> containing the specified span /// </summary> /// <param name="content"> /// The list item's content as a <see cref="MdSpan"/>. /// The span will implicitly be wrapped in a instance of see <see cref="MdParagraph"/> /// </param> public static MdListItem ListItem(MdSpan content) => new MdListItem(content);
/// <summary> /// Initializes a new instance of <see cref="MdBlockQuote"/> with the specified content /// </summary> /// <param name="content"> /// The content of the quote as a span (see <see cref="MdSpan"/>. /// The span will automatically be wrapped in an instance of <see cref="MdParagraph"/> /// </param> public MdBlockQuote(MdSpan content) : this(new MdParagraph(content)) { }