示例#1
0
        public IMarkdownObjectRewriter CreateRewriter(MarkdownContext context)
        {
            var tagValidator = new TagValidator(GetEnabledTagRules().ToImmutableList(), context);
            var validators   = from vp in _validatorProviders
                               from p in vp.GetValidators()
                               select p;

            return(MarkdownObjectRewriterFactory.FromValidators(
                       validators.Concat(
                           new[]
            {
                MarkdownObjectValidatorFactory.FromLambda <IMarkdownObject>(tagValidator.Validate)
            })));
        }
        public IMarkdownObjectRewriter CreateRewriter()
        {
            var tagValidator = new TagValidator(GetEnabledTagRules().ToImmutableList());
            var validators   = from vp in _validatorProviders
                               from p in vp.GetValidators()
                               select p;

            return(new MarkdownTokenRewriteWithScope(
                       MarkdownObjectRewriterFactory.FromValidators(
                           validators.Concat(
                               new[]
            {
                MarkdownObjectValidatorFactory.FromLambda <IMarkdownObject>(tagValidator.Validate)
            })),
                       MarkdownValidatePhaseName));
        }