public MarkdownImageInlineToken(IMarkdownRule rule, string href, string title, string text) { Rule = rule; Href = href; Title = title; Text = text; }
public MarkdownEscapeInlineToken(IMarkdownRule rule, IMarkdownContext context, string content, string rawMarkdown) { Rule = rule; Context = context; Content = content; RawMarkdown = rawMarkdown; }
public DfmVideoBlockToken(IMarkdownRule rule, IMarkdownContext context, string link, SourceInfo sourceInfo) { Rule = rule; Context = context; Link = link; SourceInfo = sourceInfo; }
public AzureVideoBlockToken(IMarkdownRule rule, IMarkdownContext context, string videoId, SourceInfo sourceInfo) { Rule = rule; Context = context; VideoId = videoId; SourceInfo = sourceInfo; }
public MarkdownEngine(IMarkdownRule[] startRules, IMarkdownRule[] continueRules, IMarkdownRule[] endRules, IMarkdownRule[] endRules2) { _startRules = startRules; _continueRules = continueRules; _endRules = endRules; _endRules2 = endRules2; }
public MarkdownTableBlockToken(IMarkdownRule rule, string[] header, Align[] align, string[][] cells) { Rule = rule; Header = header; Align = align; Cells = cells; }
public DfmSectionBlockToken(IMarkdownRule rule, IMarkdownContext context, string attributes, string rawMarkdown) { Rule = rule; Context = context; Attributes = attributes; RawMarkdown = rawMarkdown; }
public MarkdownTextToken(IMarkdownRule rule, IMarkdownContext context, string content, SourceInfo sourceInfo) { Rule = rule; Context = context; Content = content; SourceInfo = sourceInfo; }
public DfmSectionBlockToken(IMarkdownRule rule, IMarkdownContext context, string attributes, SourceInfo sourceInfo) { Rule = rule; Context = context; Attributes = attributes; SourceInfo = sourceInfo; }
public DfmYamlHeaderBlockToken(IMarkdownRule rule, IMarkdownContext context, string content, string rawMarkdown) { Rule = rule; Context = context; Content = content; RawMarkdown = rawMarkdown; }
public MarkdownCodeBlockToken(IMarkdownRule rule, IMarkdownContext context, string code, string rawMarkdown, string lang = null) { Rule = rule; Context = context; Code = code; Lang = lang; RawMarkdown = rawMarkdown; }
public GfmEmojiInlineToken(IMarkdownRule rule, IMarkdownContext context, string shortCode, string emoji, SourceInfo sourceInfo) { Rule = rule; Context = context; ShortCode = shortCode; Emoji = emoji; SourceInfo = sourceInfo; }
public AzureSelectorBlockToken(IMarkdownRule rule, IMarkdownContext context, string selectorType, string selectorConditions, SourceInfo sourceInfo) { Rule = rule; Context = context; SelectorType = selectorType; SelectorConditions = selectorConditions; SourceInfo = sourceInfo; }
public DfmNoteBlockToken(IMarkdownRule rule, IMarkdownContext context, string noteType, string content, string rawMarkdown) { Rule = rule; Context = context; Content = content; RawMarkdown = rawMarkdown; NoteType = noteType; }
public DfmNoteBlockToken(IMarkdownRule rule, IMarkdownContext context, string noteType, string content, SourceInfo sourceInfo) { Rule = rule; Context = context; Content = content; NoteType = noteType; SourceInfo = sourceInfo; }
public MarkdownLinkInlineToken(IMarkdownRule rule, string href, string title, string text, bool shouldApplyInlineRule = false) { Rule = rule; Href = href; Title = title; Text = text; ShouldApplyInlineRule = shouldApplyInlineRule; }
public MarkdownCodeBlockToken(IMarkdownRule rule, IMarkdownContext context, string code, string lang, SourceInfo sourceInfo) { Rule = rule; Context = context; Code = code; Lang = lang; SourceInfo = sourceInfo; }
public DfmFencesBlockToken(IMarkdownRule rule, string name, string path, string lang = null, string title = null) { Rule = rule; Path = path; Lang = lang; Name = name; Title = title; }
private static IMarkdownToken GroupTextTokens(IMarkdownParser parser, IMarkdownRule rule, bool wrapParagraph, StringBuffer textContent, SourceInfo si) { if (textContent.EndsWith('\n')) { textContent = textContent.Substring(0, textContent.GetLength() - 1); } var rawMarkdown = textContent.ToString(); return CreateTwoPhaseToken(parser, rule, wrapParagraph, si.Copy(rawMarkdown)); }
public MarkdownImageInlineToken(IMarkdownRule rule, IMarkdownContext context, string href, string title, string text, string rawMarkdown) { Rule = rule; Context = context; Href = href; Title = title; Text = text; RawMarkdown = rawMarkdown; }
public DfmXrefInlineToken(IMarkdownRule rule, IMarkdownContext context, string href, string name, string title, string rawMarkdown) { Rule = rule; Context = context; Href = href; Name = name; Title = title; RawMarkdown = rawMarkdown; }
protected AzureMigrationIncludeBasicToken(IMarkdownRule rule, IMarkdownContext context, string name, string src, string title, SourceInfo sourceInfo) { Rule = rule; Context = context; Name = name; Src = src; Title = title; SourceInfo = sourceInfo; }
public DfmXrefInlineToken(IMarkdownRule rule, IMarkdownContext context, string href, string name, string title, bool throwIfNotResolved, string rawMarkdown) { Rule = rule; Context = context; Href = href; Name = name; Title = title; ThrowIfNotResolved = throwIfNotResolved; RawMarkdown = rawMarkdown; }
public AzureIncludeInlineToken(IMarkdownRule rule, IMarkdownContext context, string src, string name, string title, string raw, string rawMarkdown) { Rule = rule; Context = context; Src = src; Name = name; Title = title; Raw = raw; RawMarkdown = rawMarkdown; }
public DfmIncludeInlineToken(IMarkdownRule rule, IMarkdownContext context, string src, string name, string title, string raw, SourceInfo sourceInfo) { Rule = rule; Context = context; Src = src; Name = name; Title = title; Raw = raw; SourceInfo = sourceInfo; }
public DfmFencesToken(IMarkdownRule rule, IMarkdownContext context, string name, string path, SourceInfo sourceInfo, string lang, string title, IDfmFencesBlockPathQueryOption pathQueryOption) { Rule = rule; Context = context; Path = path; Lang = lang; Name = name; Title = title; PathQueryOption = pathQueryOption; SourceInfo = sourceInfo; }
protected AzureIncludeBasicToken(IMarkdownRule rule, IMarkdownContext context, string src, string name, string title, ImmutableArray<IMarkdownToken> tokens, string raw, SourceInfo sourceInfo) { Rule = rule; Context = context; Src = src; Name = name; Title = title; Raw = raw; SourceInfo = sourceInfo; Tokens = tokens; }
public DfmFencesBlockToken(IMarkdownRule rule, IMarkdownContext context, string name, string path, string rawMarkdown, string lang = null, string title = null, DfmFencesBlockPathQueryOption pathQueryOption = null) { Rule = rule; Context = context; Path = path; Lang = lang; Name = name; Title = title; PathQueryOption = pathQueryOption; RawMarkdown = rawMarkdown; }
public MarkdownImageInlineToken(IMarkdownRule rule, IMarkdownContext context, string href, string title, string text, SourceInfo sourceInfo, MarkdownLinkType linkType, string refId) { Rule = rule; Context = context; Href = href; Title = title; Text = text; SourceInfo = sourceInfo; LinkType = linkType; RefId = refId; }
public TwoPhaseBlockToken( IMarkdownRule rule, IMarkdownContext context, string rawMarkdown, Func<IMarkdownParser, TwoPhaseBlockToken, IMarkdownToken> extractor) { Rule = rule; Context = context; RawMarkdown = rawMarkdown; _extractor = extractor; }
public MarkdownTagInlineToken(IMarkdownRule rule, IMarkdownContext context, SourceInfo sourceInfo) { Rule = rule; Context = context; SourceInfo = sourceInfo; }
public MarkdownNewLineBlockToken(IMarkdownRule rule, string content) { Rule = rule; Content = content; }
public MarkdownIgnoreToken(IMarkdownRule rule, IMarkdownContext context, string rawMarkdown) { Rule = rule; RawMarkdown = rawMarkdown; }
public MarkdownHrBlockToken(IMarkdownRule rule, IMarkdownContext context, SourceInfo sourceInfo) { Rule = rule; Context = context; SourceInfo = sourceInfo; }
public AzureNoteBlockToken(IMarkdownRule rule, IMarkdownContext context, string noteType, string content, string rawMarkdown) : base(rule, context, content, rawMarkdown) { NoteType = noteType; }
public static MarkdownParagraphBlockToken Create(IMarkdownRule rule, MarkdownParser engine, string content, SourceInfo sourceInfo) { return(new MarkdownParagraphBlockToken(rule, engine.Context, engine.TokenizeInline(sourceInfo.Copy(content)), sourceInfo)); }
public MarkdownListItemBlockToken(IMarkdownRule rule, ImmutableArray <IMarkdownToken> tokens, bool loose) { Rule = rule; Tokens = tokens; Loose = loose; }
public MarkdownHrBlockToken(IMarkdownRule rule) { Rule = rule; }
public MarkdownIgnoreToken(IMarkdownRule rule) { Rule = rule; }
public DfmSectionBeginBlockToken(IMarkdownRule rule, string attributes) { Rule = rule; Attributes = attributes; }
public MarkdownParagraphBlockToken(IMarkdownRule rule, string content) { Rule = rule; Content = content; }
public GfmDelInlineToken(IMarkdownRule rule, string content) { Rule = rule; Content = content; }
public AzureIncludeInlineToken(IMarkdownRule rule, IMarkdownContext context, string src, string name, string title, ImmutableArray <IMarkdownToken> tokens, string raw, SourceInfo sourceInfo) : base(rule, context, src, name, title, tokens, raw, sourceInfo) { }
public static MarkdownParagraphBlockToken Create(IMarkdownRule rule, MarkdownParser engine, string content, string rawMarkdown) { return(new MarkdownParagraphBlockToken(rule, engine.Context, engine.TokenizeInline(content), rawMarkdown)); }
public MarkdownTextToken(IMarkdownRule rule, string content) { Rule = rule; Content = content; }
protected StringBuffer RenderTokens(IMarkdownRenderer engine, ImmutableArray <IMarkdownToken> tokens, MarkdownBlockContext context, bool wrapParagraph = false, IMarkdownRule rule = null) { var content = StringBuffer.Empty; var textContent = StringBuffer.Empty; foreach (var t in tokens) { var text = t as MarkdownTextToken; if (text != null) { if (textContent != StringBuffer.Empty) { textContent += "\n"; } textContent += text.Content; continue; } if (!wrapParagraph && t is MarkdownNewLineBlockToken) { continue; } if (textContent != StringBuffer.Empty) { content += RenderTextInTokens(engine, context, wrapParagraph, rule, textContent, t.RawMarkdown); textContent = StringBuffer.Empty; } content += engine.Render(t); } if (textContent != StringBuffer.Empty) { content += RenderTextInTokens(engine, context, wrapParagraph, rule, textContent, textContent); } return(content); }
private StringBuffer RenderTextInTokens(IMarkdownRenderer renderer, MarkdownBlockContext context, bool wrapParagraph, IMarkdownRule rule, StringBuffer textContent, string rawMarkdown) { if (wrapParagraph) { var parser = renderer.Engine.Parser; var c = parser.SwitchContext(context); var inlineContent = parser.TokenizeInline(textContent); parser.SwitchContext(c); return(Render(renderer, new MarkdownParagraphBlockToken(rule, context, inlineContent, rawMarkdown), context)); } else { return(ApplyInline(renderer, textContent, context)); } }
public AzureBlockquoteBlockToken(IMarkdownRule rule, IMarkdownContext context, ImmutableArray <IMarkdownToken> tokens, string rawMarkdown) : base(rule, context, tokens, rawMarkdown) { }
private StringBuffer RenderTextInTokens(IMarkdownRenderer engine, MarkdownBlockContext context, bool wrapParagraph, IMarkdownRule rule, StringBuffer textContent, string rawMarkdown) { if (wrapParagraph) { return(Render(engine, new MarkdownParagraphBlockToken(rule, context, engine.Engine.Parser.TokenizeInline(textContent), rawMarkdown), context)); } else { return(ApplyInline(engine, textContent, context)); } }
public DfmFencesToken(IMarkdownRule rule, IMarkdownContext context, string name, string path, SourceInfo sourceInfo, string lang, string title, IDfmFencesBlockPathQueryOption pathQueryOption) : this(rule, context, name, path, sourceInfo, lang, title, pathQueryOption, null) { }
public MarkdownBlockquoteBlockToken(IMarkdownRule rule, ImmutableArray <IMarkdownToken> tokens) { Rule = rule; Tokens = tokens; }
public MarkdownListBlockToken(IMarkdownRule rule, ImmutableArray <IMarkdownToken> tokens, bool ordered) { Rule = rule; Tokens = tokens; Ordered = ordered; }
public MarkdownCodeInlineToken(IMarkdownRule rule, string content) { Rule = rule; Content = content; }
private static TwoPhaseBlockToken CreateTwoPhaseToken(IMarkdownParser parser, IMarkdownRule rule, bool wrapParagraph, SourceInfo sourceInfo) { var inlineContent = parser.TokenizeInline(sourceInfo); if (wrapParagraph) { return(new TwoPhaseBlockToken( rule, parser.Context, sourceInfo, (p, t) => new MarkdownParagraphBlockToken(t.Rule, p.Context, p.TokenizeInline(t.SourceInfo), t.SourceInfo))); } else { return(new TwoPhaseBlockToken( rule, parser.Context, sourceInfo, (p, t) => new MarkdownNonParagraphBlockToken(t.Rule, p.Context, p.TokenizeInline(t.SourceInfo), t.SourceInfo))); } }
public MarkdownNewLineBlockToken(IMarkdownRule rule, IMarkdownContext context, string rawMarkdown) { Rule = rule; Context = context; RawMarkdown = rawMarkdown; }
public MarkdownTagInlineToken(IMarkdownRule rule, IMarkdownContext context, string rawMarkdown) { Rule = rule; Context = context; RawMarkdown = rawMarkdown; }
public AzureIncludeInlineToken(IMarkdownRule rule, IMarkdownContext context, string src, string name, string title, string raw, string rawMarkdown) : base(rule, context, src, name, title, raw, rawMarkdown) { }
public DfmFencesInlineToken(IMarkdownRule rule, IMarkdownContext context, string name, string path, SourceInfo sourceInfo, string lang = null, string title = null, IDfmFencesBlockPathQueryOption pathQueryOption = null) : base(rule, context, name, path, sourceInfo, lang, title, pathQueryOption) { }
public AzureBlockquoteBlockToken(IMarkdownRule rule, IMarkdownContext context, ImmutableArray <IMarkdownToken> tokens, SourceInfo sourceInfo) : base(rule, context, tokens, sourceInfo) { }
public DfmFencesInlineToken(IMarkdownRule rule, IMarkdownContext context, string name, string path, SourceInfo sourceInfo, string lang = null, string title = null, string queryStringAndFragment = null) : base(rule, context, name, path, sourceInfo, lang, title, queryStringAndFragment) { }