public static MarkdownPipelineBuilder UseCodeBlockAnnotations( this MarkdownPipelineBuilder pipeline, CodeFenceAnnotationsParser annotationsParser = null, bool inlineControls = true) { var extensions = pipeline.Extensions; if (!extensions.Contains <CodeBlockAnnotationExtension>()) { extensions.Add(new CodeBlockAnnotationExtension(annotationsParser) { InlineControls = inlineControls }); } return(pipeline); }
public AnnotatedCodeBlockParser(CodeFenceAnnotationsParser codeFenceAnnotationsParser) { _codeFenceAnnotationsParser = codeFenceAnnotationsParser ?? throw new ArgumentNullException(nameof(codeFenceAnnotationsParser)); OpeningCharacters = new[] { '`' }; InfoParser = ParseCodeOptions; }
public CodeBlockAnnotationExtension(CodeFenceAnnotationsParser annotationsParser = null) { _annotationsParser = annotationsParser ?? new CodeFenceAnnotationsParser(); }