public DfmTabItemBlockToken(IMarkdownRule rule, IMarkdownContext context, string id, string condition, DfmTabTitleBlockToken title, DfmTabContentBlockToken content, SourceInfo sourceInfo) { Rule = rule; Context = context; Id = id; Condition = condition; Title = title; Content = content; SourceInfo = sourceInfo; }
public virtual StringBuffer Render(IMarkdownRenderer renderer, DfmTabContentBlockToken token, IMarkdownContext context) { var sb = StringBuffer.Empty; foreach (var item in token.Content) { sb += renderer.Render(item); } return(sb); }
private static DfmTabItemBlockToken CreateTabItem( TabItemInfo info) { var title = new DfmTabTitleBlockToken( DfmTabGroupBlockRule.Instance, info.Context, info.Title, info.HeadSource); var content = new DfmTabContentBlockToken( DfmTabGroupBlockRule.Instance, info.Context, info.Content.ToImmutableArray(), info.GetContentSourceInfo()); return(new DfmTabItemBlockToken( DfmTabGroupBlockRule.Instance, info.Context, info.Id, info.Condition, title, content, info.GetItemSourceInfo())); }