public void Initialize(ParserRegistrationContext context) { context.Register(typeof(FootnoteGroup), ParseFootnoteGroup); context.Register(typeof(FootnoteLink), ParseFootnoteLink); context.Register(typeof(FootnoteLinkReferenceDefinition), ParseFootnoteLinkReferenceDefinition); context.RegisterFinalizer(Finalize); }
public void Initialize(ParserRegistrationContext context) { context.Register(typeof(FencedCodeBlock), ParseCodeBlock); var configuration = context.Configuration; var codeBlocksConfig = configuration.Parsing.CodeBlocks; ParseUndefinedLanguages = codeBlocksConfig.ParseUndefinedLanguages; LanguageWhiteListTest = codeBlocksConfig.LanguageWhiteList; LanguageBlackListTest = codeBlocksConfig.LanguageBlackList; Parsers.AddRange(codeBlocksConfig.Parsers); if (ParseUndefinedLanguages) { foreach (var parser in Parsers) { if (parser.SupportsUndefinedLanguages) { UndefinedLanguageParsers.Add(parser); } } } foreach (var language in CodeBlocksConfig.CommonLanguages) { List <ICodeBlockParser> languageParsers = null; if (LanguageWhiteListTest(language) && !LanguageBlackListTest(language)) { languageParsers = new List <ICodeBlockParser>(4); foreach (var parser in Parsers) { if (parser.SupportsLanguage(language)) { languageParsers.Add(parser); } } if (languageParsers.Count == 0) { languageParsers = null; } } CommonLanguages.Add(language, languageParsers); } foreach (var parser in Parsers) { parser.Initialize(configuration); } }
public void Initialize(ParserRegistrationContext context) { context.Register(typeof(AutolinkInline), ParseAutoLinkInline); }
public void Initialize(ParserRegistrationContext context) { context.Register(typeof(LinkReferenceDefinition), ParseLinkReferenceDefinition); }
public void Initialize(ParserRegistrationContext context) { context.Register(typeof(HeadingBlock), ParseHeadingBlock); }
public void Initialize(ParserRegistrationContext context) { context.Register(typeof(MarkdownDocument), ParseDocument); ParserConfig = context.ReadConfig <CustomConfig>(writeIfDefault: true); }
public void Initialize(ParserRegistrationContext context) { context.Register(typeof(LiteralInline), ParseLiteralInline); }