/// <summary>Prints the specified text alignment.</summary> /// <param name="textAlignment">The text alignment.</param> /// <returns>A string that represents the current markdown table text alignment.</returns> public static string Print(this MarkdownTableTextAlignment textAlignment) { return(textAlignment switch { MarkdownTableTextAlignment.Left => ":--", MarkdownTableTextAlignment.Center => ":-:", MarkdownTableTextAlignment.Right => "--:", _ => "---" });
/// <summary> /// Initializes a new instance of the <see cref="MarkdownTableHeaderCell" /> class. /// </summary> /// <param name="inlineElement">The header cell text as markdown inline element.</param> /// <param name="textAlignment">The column text alignment.</param> public MarkdownTableHeaderCell(MarkdownInlineElement inlineElement, MarkdownTableTextAlignment textAlignment) : base(inlineElement) { this.ColumnTextAlignment = textAlignment; }
/// <summary> /// Initializes a new instance of the <see cref="MarkdownTableHeaderCell" /> class. /// </summary> /// <param name="text">The header cell text.</param> /// <param name="textAlignment">The column text alignment.</param> public MarkdownTableHeaderCell(string text, MarkdownTableTextAlignment textAlignment) : base(text) { this.ColumnTextAlignment = textAlignment; }