public MarkdownList(MarkdownMatch match) : base(match) { var itemDelimiterRegex = match.Groups["listitemdelimiter"].Value; char firstNonWhiteSpaceCharacter = itemDelimiterRegex.Trim()[0]; this.IsOrdered = char.IsNumber(firstNonWhiteSpaceCharacter); if (this.IsOrdered) { itemDelimiterRegex = itemDelimiterRegex .Replace(firstNonWhiteSpaceCharacter.ToString(), @"\d+") .Replace(".", @"\.") .Replace(")", @"\)"); } else { itemDelimiterRegex = itemDelimiterRegex.Replace("*", @"\*"); } string rawListMarkdown = Regex.Replace(match.MatchValue, @"^" + itemDelimiterRegex, string.Empty); this.ItemDelimiterRegex = @"(\r\n|\n)+" + itemDelimiterRegex; this.Children = Regex.Split(rawListMarkdown, this.ItemDelimiterRegex) .Where(x => !string.IsNullOrWhiteSpace(x)) .Select(x => (DomItem) new MarkdownListItem(x, parent: this, recursiveParser: match.RecursiveParser)) .ToList(); this.Value = string.Join(string.Empty, this.Children.Select(x => x.UniqueKey)); }
public H4(MarkdownMatch match) : base(match) { }
public Strikethrough(MarkdownMatch match) : base(match) { }
public Bold(MarkdownMatch match) : base(match) { }
public HeaderBase(MarkdownMatch match) : base(match) { }
public HorizontalRule(MarkdownMatch match) : base(match) { }
public Blockquote(MarkdownMatch match) : base(match) { }
public DomItem(MarkdownMatch match) : this(match?.Groups["capture"].Value, match?.Parent, match?.RecursiveParser) { this.FullMatchValue = match?.MatchValue; }
public InlineCode(MarkdownMatch match) : base(match) { }
public Link(MarkdownMatch match) : base(match) { this.Url = match.Groups["url"].Value; this.LinkText = match.Groups["linktext"].Value; }
public Italics(MarkdownMatch match) : base(match) { }
public BlockCode(MarkdownMatch match) : base(match) { }
public Image(MarkdownMatch match) : base(match) { this.Url = match.Groups["url"].Value; this.AltText = match.Groups["alttext"].Value; }
public HtmlTag(MarkdownMatch match) : base(match) { }
public CodeBase(MarkdownMatch match) : base(match) { }