コード例 #1
0
ファイル: TsxRenderer.cs プロジェクト: bobril/bbcore
        public TsxRenderer()
        {
            _outputContext = new(new() { Beautify = true });

            ObjectRenderers.Add(new AbbreviationRenderer());
            ObjectRenderers.Add(new CodeBlockRenderer());
            ObjectRenderers.Add(new ListRenderer());
            ObjectRenderers.Add(new HeadingRenderer());
            ObjectRenderers.Add(new HtmlBlockRenderer());
            ObjectRenderers.Add(new ParagraphRenderer());
            ObjectRenderers.Add(new QuoteBlockRenderer());
            ObjectRenderers.Add(new ThematicBreakRenderer());
            ObjectRenderers.Add(new HtmlTableRenderer());
            ObjectRenderers.Add(new ImportRenderer());
            ObjectRenderers.Add(new TsxDefinitionListRenderer());
            ObjectRenderers.Add(new TsxFooterBlockRenderer());

            ObjectRenderers.Add(new AutolinkInlineRenderer());
            ObjectRenderers.Add(new CodeInlineRenderer());
            ObjectRenderers.Add(new DelimiterInlineRenderer());
            ObjectRenderers.Add(new EmphasisInlineRenderer());
            ObjectRenderers.Add(new LineBreakInlineRenderer());
            ObjectRenderers.Add(new HtmlInlineRenderer());
            ObjectRenderers.Add(new HtmlEntityInlineRenderer());
            ObjectRenderers.Add(new LinkInlineRenderer());
            ObjectRenderers.Add(new LiteralInlineRenderer());
            ObjectRenderers.Add(new MdxCodeInlineRenderer());
            ObjectRenderers.Add(new TsxFigureCaptionRenderer());
            ObjectRenderers.Add(new TsxTaskListRenderer());

            EnableHtmlForBlock  = true;
            EnableHtmlForInline = true;
            EnableHtmlEscape    = true;
        }
コード例 #2
0
        public MamlRenderer(Stream stream, string relativeDirectory) : base()
        {
            RelativeDirectory = relativeDirectory;

            ObjectRenderers.Add(new LiteralInlineRenderer());
            ObjectRenderers.Add(new LineBreakInlineRenderer());
            ObjectRenderers.Add(new LinkInlineRenderer());
            ObjectRenderers.Add(new EmphasisInlineRenderer());
            ObjectRenderers.Add(new CodeInlineRenderer());
            ObjectRenderers.Add(new YamlFrontMatterRenderer());
            ObjectRenderers.Add(new ParagraphBlockRenderer());
            ObjectRenderers.Add(new HeadingRenderer());
            ObjectRenderers.Add(new TableRenderer());
            ObjectRenderers.Add(new TableRowRenderer());
            ObjectRenderers.Add(new TableCellRenderer());
            ObjectRenderers.Add(new ListBlockRenderer());
            ObjectRenderers.Add(new ListItemBlockRenderer());
            ObjectRenderers.Add(new QuoteBlockRenderer());
            ObjectRenderers.Add(new FencedCodeBlockRenderer());
            ObjectRenderers.Add(new DefinitionListRenderer());
            ObjectRenderers.Add(new DefinitionItemRenderer());
            ObjectRenderers.Add(new CodeSnippetRenderer());

            var settings = new XmlWriterSettings()
            {
                Encoding    = Encoding.UTF8,
                Indent      = true,
                IndentChars = "  ",
            };

            XmlWriter = XmlWriter.Create(stream, settings);
            XmlWriter.WriteStartDocument();
        }
コード例 #3
0
        public WpfRenderer([NotNull] FlowDocument document)
        {
            buffer   = new char[1024];
            Document = document;
            document.SetResourceReference(FrameworkContentElement.StyleProperty, Styles.DocumentStyleKey);
            stack.Push(document);

            // Default block renderers
            ObjectRenderers.Add(new CodeBlockRenderer());
            ObjectRenderers.Add(new ListRenderer());
            ObjectRenderers.Add(new HeadingRenderer());
            ObjectRenderers.Add(new ParagraphRenderer());
            ObjectRenderers.Add(new QuoteBlockRenderer());
            ObjectRenderers.Add(new ThematicBreakRenderer());

            // Default inline renderers
            ObjectRenderers.Add(new AutolinkInlineRenderer());
            ObjectRenderers.Add(new CodeInlineRenderer());
            ObjectRenderers.Add(new DelimiterInlineRenderer());
            ObjectRenderers.Add(new EmphasisInlineRenderer());
            ObjectRenderers.Add(new LineBreakInlineRenderer());
            ObjectRenderers.Add(new LinkInlineRenderer());
            ObjectRenderers.Add(new LiteralInlineRenderer());

            // Extension renderers
            ObjectRenderers.Add(new TableRenderer());
            ObjectRenderers.Add(new TaskListRenderer());
        }
コード例 #4
0
ファイル: HtmlRenderer.cs プロジェクト: obarlik/markdig
        /// <summary>
        /// Initializes a new instance of the <see cref="HtmlRenderer"/> class.
        /// </summary>
        /// <param name="writer">The writer.</param>
        public HtmlRenderer(TextWriter writer) : base(writer)
        {
            // Default block renderers
            ObjectRenderers.Add(new CodeBlockRenderer());
            ObjectRenderers.Add(new ListRenderer());
            ObjectRenderers.Add(new HeadingRenderer());
            ObjectRenderers.Add(new HtmlBlockRenderer());
            ObjectRenderers.Add(new ParagraphRenderer());
            ObjectRenderers.Add(new QuoteBlockRenderer());
            ObjectRenderers.Add(new ThematicBreakRenderer());

            // Default inline renderers
            ObjectRenderers.Add(new AutolinkInlineRenderer());
            ObjectRenderers.Add(new CodeInlineRenderer());
            ObjectRenderers.Add(new DelimiterInlineRenderer());
            ObjectRenderers.Add(new EmphasisInlineRenderer());
            ObjectRenderers.Add(new LineBreakInlineRenderer());
            ObjectRenderers.Add(new HtmlInlineRenderer());
            ObjectRenderers.Add(new HtmlEntityInlineRenderer());
            ObjectRenderers.Add(new LinkInlineRenderer());
            ObjectRenderers.Add(new LiteralInlineRenderer());

            EnableHtmlForBlock  = true;
            EnableHtmlForInline = true;
            EnableHtmlEscape    = true;
        }
コード例 #5
0
ファイル: AggRenderer.cs プロジェクト: tg73/MatterControl
        public AggRenderer(GuiWidget rootWidget)
        {
            this.theme = ApplicationController.Instance.Theme;

            buffer     = new char[1024];
            RootWidget = rootWidget;

            stack.Push(rootWidget);

            // Default block renderers
            ObjectRenderers.Add(new AggCodeBlockRenderer(theme));
            ObjectRenderers.Add(new AggListRenderer(theme));
            ObjectRenderers.Add(new AggHeadingRenderer());
            ObjectRenderers.Add(new AggParagraphRenderer());
            ObjectRenderers.Add(new AggQuoteBlockRenderer());
            ObjectRenderers.Add(new AggThematicBreakRenderer());

            ObjectRenderers.Add(new AggParagraphRenderer());

            // Default inline renderers
            ObjectRenderers.Add(new AggAutolinkInlineRenderer());
            ObjectRenderers.Add(new AggCodeInlineRenderer(theme));
            ObjectRenderers.Add(new AggDelimiterInlineRenderer());
            ObjectRenderers.Add(new AggEmphasisInlineRenderer());
            ObjectRenderers.Add(new AggLineBreakInlineRenderer());
            ObjectRenderers.Add(new AggLinkInlineRenderer());
            ObjectRenderers.Add(new AggLiteralInlineRenderer());

            ObjectRenderers.Add(new AggMatchingTextRenderer(theme));

            // Extension renderers
            //ObjectRenderers.Add(new AggTableRenderer());
            //ObjectRenderers.Add(new AggTaskListRenderer());
        }
コード例 #6
0
ファイル: NormalizeRenderer.cs プロジェクト: tylkomat/markdig
        /// <summary>
        /// Initializes a new instance of the <see cref="NormalizeRenderer"/> class.
        /// </summary>
        /// <param name="writer">The writer.</param>
        /// <param name="options">The normalize options</param>
        public NormalizeRenderer(TextWriter writer, NormalizeOptions options = null) : base(writer)
        {
            Options = options ?? new NormalizeOptions();
            // Default block renderers
            ObjectRenderers.Add(new CodeBlockRenderer());
            ObjectRenderers.Add(new ListRenderer());
            ObjectRenderers.Add(new HeadingRenderer());
            ObjectRenderers.Add(new HtmlBlockRenderer());
            ObjectRenderers.Add(new ParagraphRenderer());
            ObjectRenderers.Add(new QuoteBlockRenderer());
            ObjectRenderers.Add(new ThematicBreakRenderer());
            ObjectRenderers.Add(new LinkReferenceDefinitionGroupRenderer());
            ObjectRenderers.Add(new LinkReferenceDefinitionRenderer());

            // Default inline renderers
            ObjectRenderers.Add(new AutolinkInlineRenderer());
            ObjectRenderers.Add(new CodeInlineRenderer());
            ObjectRenderers.Add(new DelimiterInlineRenderer());
            ObjectRenderers.Add(new EmphasisInlineRenderer());
            ObjectRenderers.Add(new LineBreakInlineRenderer());
            ObjectRenderers.Add(new NormalizeHtmlInlineRenderer());
            ObjectRenderers.Add(new NormalizeHtmlEntityInlineRenderer());
            ObjectRenderers.Add(new LinkInlineRenderer());
            ObjectRenderers.Add(new LiteralInlineRenderer());
        }
コード例 #7
0
        private readonly StringBuilder textBuffer = new StringBuilder(); // current text buffer to collect all words

        #region -- Ctor/Dtor ----------------------------------------------------------

        /// <summary>Initializes a new instance of the <see cref="XamlMarkdownWriter"/> class.</summary>
        /// <param name="writer">Target for the xaml content.</param>
        public XamlMarkdownWriter(XamlWriter writer)
        {
            this.writer = writer ?? throw new ArgumentNullException(nameof(writer));

            this.runType       = SchemaContext.GetXamlType(typeof(Run)) ?? throw new ArgumentNullException(nameof(Run));
            this.runTextMember = runType.GetMember(nameof(Run.Text)) ?? throw new ArgumentNullException(nameof(Run.Text));

            // Default block renderers
            ObjectRenderers.Add(new CodeBlockRenderer());
            ObjectRenderers.Add(new ListRenderer());
            ObjectRenderers.Add(new HeadingRenderer());
            ObjectRenderers.Add(new ParagraphRenderer());
            ObjectRenderers.Add(new QuoteBlockRenderer());
            ObjectRenderers.Add(new ThematicBreakRenderer());

            // Default inline renderers
            ObjectRenderers.Add(new AutolinkInlineRenderer());
            ObjectRenderers.Add(new CodeInlineRenderer());
            ObjectRenderers.Add(new DelimiterInlineRenderer());
            ObjectRenderers.Add(new EmphasisInlineRenderer());
            ObjectRenderers.Add(new EntityInlineRenderer());
            ObjectRenderers.Add(new LineBreakInlineRenderer());
            ObjectRenderers.Add(new LinkInlineRenderer());
            ObjectRenderers.Add(new LiteralInlineRenderer());

            // Extension renderers
            ObjectRenderers.Add(new TableRenderer());
            ObjectRenderers.Add(new TaskListRenderer());
        } // ctor
コード例 #8
0
ファイル: RoundtripRenderer.cs プロジェクト: ywscr/markdig
        /// <summary>
        /// Initializes a new instance of the <see cref="RoundtripRenderer"/> class.
        /// </summary>
        /// <param name="writer">The writer.</param>
        public RoundtripRenderer(TextWriter writer) : base(writer)
        {
            // Default block renderers
            ObjectRenderers.Add(new CodeBlockRenderer());
            ObjectRenderers.Add(new ListRenderer());
            ObjectRenderers.Add(new HeadingRenderer());
            ObjectRenderers.Add(new HtmlBlockRenderer());
            ObjectRenderers.Add(new ParagraphRenderer());
            ObjectRenderers.Add(new QuoteBlockRenderer());
            ObjectRenderers.Add(new ThematicBreakRenderer());
            ObjectRenderers.Add(new LinkReferenceDefinitionGroupRenderer());
            ObjectRenderers.Add(new LinkReferenceDefinitionRenderer());
            ObjectRenderers.Add(new EmptyBlockRenderer());

            // Default inline renderers
            ObjectRenderers.Add(new AutolinkInlineRenderer());
            ObjectRenderers.Add(new CodeInlineRenderer());
            ObjectRenderers.Add(new DelimiterInlineRenderer());
            ObjectRenderers.Add(new EmphasisInlineRenderer());
            ObjectRenderers.Add(new LineBreakInlineRenderer());
            ObjectRenderers.Add(new RoundtripHtmlInlineRenderer());
            ObjectRenderers.Add(new RoundtripHtmlEntityInlineRenderer());
            ObjectRenderers.Add(new LinkInlineRenderer());
            ObjectRenderers.Add(new LiteralInlineRenderer());
        }
コード例 #9
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PPTXRenderer"/> class.
        /// </summary>
        /// <param name="writer">The writer.</param>
        /// <param name="options">The PPTX options</param>
        public PPTXRenderer(SlideManager Writer, PPTXSetting options = null)
        {
            this.Writer = Writer;

            Options = options ?? new PPTXSetting();
            // Default block renderers
            ObjectRenderers.Add(new CodeBlockRenderer());
            ObjectRenderers.Add(new ListRenderer());
            ObjectRenderers.Add(new HeadingRenderer());
            ObjectRenderers.Add(new HtmlBlockRenderer());
            ObjectRenderers.Add(new ParagraphRenderer());
            ObjectRenderers.Add(new QuoteBlockRenderer());
            ObjectRenderers.Add(new ThematicBreakRenderer());
            ObjectRenderers.Add(new LinkReferenceDefinitionGroupRenderer());
            ObjectRenderers.Add(new LinkReferenceDefinitionRenderer());
            ObjectRenderers.Add(new TableRenderer());

            // Default inline renderers
            ObjectRenderers.Add(new AutolinkInlineRenderer());
            ObjectRenderers.Add(new CodeInlineRenderer());
            ObjectRenderers.Add(new DelimiterInlineRenderer());
            ObjectRenderers.Add(new EmphasisInlineRenderer());
            ObjectRenderers.Add(new LineBreakInlineRenderer());
            ObjectRenderers.Add(new PPTXHtmlInlineRenderer());
            ObjectRenderers.Add(new PPTXHtmlEntityInlineRenderer());
            ObjectRenderers.Add(new LinkInlineRenderer());
            ObjectRenderers.Add(new LiteralInlineRenderer());
        }
コード例 #10
0
        public WpfRenderer(FlowDocument document)
        {
            buffer   = new char[1024];
            Document = document;

            // Default block renderers
            //ObjectRenderers.Add(new CodeBlockRenderer());
            //ObjectRenderers.Add(new ListRenderer());
            //ObjectRenderers.Add(new HeadingRenderer());
            //ObjectRenderers.Add(new HtmlBlockRenderer());
            ObjectRenderers.Add(new ParagraphRenderer());
            //ObjectRenderers.Add(new QuoteBlockRenderer());
            //ObjectRenderers.Add(new ThematicBreakRenderer());

            // Default inline renderers
            //ObjectRenderers.Add(new AutolinkInlineRenderer());
            //ObjectRenderers.Add(new CodeInlineRenderer());
            ObjectRenderers.Add(new DelimiterInlineRenderer());
            //ObjectRenderers.Add(new EmphasisInlineRenderer());
            ObjectRenderers.Add(new LineBreakInlineRenderer());
            //ObjectRenderers.Add(new HtmlInlineRenderer());
            //ObjectRenderers.Add(new HtmlEntityInlineRenderer());
            //ObjectRenderers.Add(new LinkInlineRenderer());
            ObjectRenderers.Add(new LiteralInlineRenderer());
        }
コード例 #11
0
        public ComponentRenderer()
        {
            // Block renderers
            ObjectRenderers.Add(new QuoteBlockRenderer());
            ObjectRenderers.Add(new TableRenderer());
            ObjectRenderers.Add(new MathBlockRenderer());
            ObjectRenderers.Add(new CodeBlockRenderer());
            ObjectRenderers.Add(new HeadingsRenderer());
            ObjectRenderers.Add(new ListRenderer());
            ObjectRenderers.Add(new ParagraphRenderer());
            ObjectRenderers.Add(new ThematicBreakRenderer());

            // Inline renderers
            ObjectRenderers.Add(new MathInlineRenderer());
            ObjectRenderers.Add(new EmphasisInlineRenderer());
            ObjectRenderers.Add(new LinkInlineRenderer());
            ObjectRenderers.Add(new AutolinkInlineRenderer());
            ObjectRenderers.Add(new LineBreakInlineRenderer());
            ObjectRenderers.Add(new CodeInlineRenderer());
            ObjectRenderers.Add(new LiteralInlineRenderer());

            _htmlRenderer = new HtmlRenderer(new StringWriter());
            _htmlRenderer.ObjectRenderers.Add(new HtmlMathInlineRenderer());
            _htmlRenderer.ObjectRenderers.Add(new HtmlTableRenderer());

            var mediaExtension = new MediaLinkExtension();

            mediaExtension.Setup(null, _htmlRenderer);
        }
コード例 #12
0
ファイル: WpfRenderer.cs プロジェクト: ekblom/noterium
        public WpfRenderer([NotNull] FlowDocument document) : base(document)
        {
            ObjectRenderers.RemoveAt(ObjectRenderers.FindIndex(x => x is Markdig.Renderers.Wpf.Extensions.TaskListRenderer));
            ObjectRenderers.Add(new TaskListRenderer());

            ObjectRenderers.RemoveAt(ObjectRenderers.FindIndex(x => x is Markdig.Renderers.Wpf.Inlines.LinkInlineRenderer));
            ObjectRenderers.Add(new LinkInlineRenderer());
        }
コード例 #13
0
 public DebugOutputRenderer(string originalMarkdown, TextWriter writer) : base(writer)
 {
     OriginalMarkdown = originalMarkdown;
     ObjectRenderers.Add(new ContainerBlockRenderer());
     ObjectRenderers.Add(new ContainerInlineRenderer());
     ObjectRenderers.Add(new LeafBlockRenderer());
     ObjectRenderers.Add(new LiteralInlineRenderer());
     ObjectRenderers.Add(new LeafInlineRenderer());
 }
コード例 #14
0
ファイル: AdfRenderer.cs プロジェクト: Thorarin/Markdig.Adf
        public AdfRenderer(AdfDocument document)
        {
            Document = document;

            _stack.Push(document);

            ObjectRenderers.Add(new HeadingRenderer());
            ObjectRenderers.Add(new ParagraphRenderer());
            ObjectRenderers.Add(new TextRenderer());
            ObjectRenderers.Add(new LineBreakRenderer());
        }
コード例 #15
0
ファイル: DiscordRenderer.cs プロジェクト: Jinivus/MD2Discord
        public DiscordRenderer(TextWriter writer) : base(writer)
        {
            // Default block renderers
            ObjectRenderers.Add(new CodeBlockRenderer());
            ObjectRenderers.Add(new ListRenderer());
            ObjectRenderers.Add(new HeadingRenderer());
            ObjectRenderers.Add(new HtmlBlockRenderer());
            ObjectRenderers.Add(new ParagraphRenderer());
            ObjectRenderers.Add(new QuoteBlockRenderer());
            ObjectRenderers.Add(new ThematicBreakRenderer());

            EnableHtmlEscape = true;
        }
コード例 #16
0
 public JsonRenderer(TextWriter writer) : base(writer)
 {
     JsonWriter = new JsonTextWriter(writer);
     ObjectRenderers.Add(new ParagraphRenderer());
     ObjectRenderers.Add(new AutolinkInlineRenderer());
     ObjectRenderers.Add(new CodeInlineRenderer());
     ObjectRenderers.Add(new DelimiterInlineRenderer());
     ObjectRenderers.Add(new EmphasisInlineRenderer());
     ObjectRenderers.Add(new LineBreakInlineRenderer());
     ObjectRenderers.Add(new NormalizeHtmlEntityInlineRenderer());
     ObjectRenderers.Add(new LinkInlineRenderer());
     ObjectRenderers.Add(new LiteralInlineRenderer());
 }
コード例 #17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OpenXMLWpfMathRenderer"/> class.
 /// </summary>
 public OpenXMLWpfMathRenderer()
 {
     ObjectRenderers.Add(new Renderers.RowAtomRenderer());         // elements in a row
     ObjectRenderers.Add(new Renderers.FractionAtomRenderer());    // fractions
     ObjectRenderers.Add(new Renderers.BigOperatorAtomRenderer()); // integrals, sums operators, product operators, functions
     ObjectRenderers.Add(new Renderers.ScriptsAtomRenderer());     // scripts like sub and superscript
     ObjectRenderers.Add(new Renderers.RadicalAtomRenderer());     // radicals like square root
     ObjectRenderers.Add(new Renderers.AccentedAtomRenderer());    // symbols with accent, e.g. a tilde over the base symbol
     ObjectRenderers.Add(new Renderers.UnderlinedAtomRenderer());  // symbols with a line underneath
     ObjectRenderers.Add(new Renderers.OverlinedAtomRenderer());   // symbols with a line above
     ObjectRenderers.Add(new Renderers.SymbolAtomRenderer());      // symbols like operators, greek,
     ObjectRenderers.Add(new Renderers.CharAtomRenderer());        // single chars
     ObjectRenderers.Add(new Renderers.StyledAtomRenderer());      // elements with special foreground or background color
     ObjectRenderers.Add(new Renderers.TypedAtomRenderer());       // elements hold together, like a function argument
     ObjectRenderers.Add(new Renderers.FencedAtomRenderer());      // Delimiters that can change size
 }
コード例 #18
0
        /// <summary>
        /// Initializes a new instance of the <see cref="VT100Renderer"/> class.
        /// </summary>
        /// <param name="writer">TextWriter to write to.</param>
        /// <param name="optionInfo">PSMarkdownOptionInfo object with options.</param>
        public VT100Renderer(TextWriter writer, PSMarkdownOptionInfo optionInfo) : base(writer)
        {
            EscapeSequences = new VT100EscapeSequences(optionInfo);

            // Add the various element renderers.
            ObjectRenderers.Add(new HeaderBlockRenderer());
            ObjectRenderers.Add(new LineBreakRenderer());
            ObjectRenderers.Add(new CodeInlineRenderer());
            ObjectRenderers.Add(new FencedCodeBlockRenderer());
            ObjectRenderers.Add(new EmphasisInlineRenderer());
            ObjectRenderers.Add(new ParagraphBlockRenderer());
            ObjectRenderers.Add(new LeafInlineRenderer());
            ObjectRenderers.Add(new LinkInlineRenderer());
            ObjectRenderers.Add(new ListBlockRenderer());
            ObjectRenderers.Add(new ListItemBlockRenderer());
            ObjectRenderers.Add(new QuoteBlockRenderer());
        }
コード例 #19
0
        public HtmlRenderer(TextWriter writer, bool rendererHeaderAndFooter = false) : base(writer)
        {
            RendererHeaderAndFooter = rendererHeaderAndFooter;

            //Cell renderer
            ObjectRenderers.Add(new MarkdownCellRenderer());
            ObjectRenderers.Add(new CodeCellRenderer());
            ObjectRenderers.Add(new RawCellRenderer());

            //Common renderer
            ObjectRenderers.Add(new LinesRenderer());

            //Output renderer
            ObjectRenderers.Add(new DisplayDataOutputRenderer());
            ObjectRenderers.Add(new ErrorOutputRenderer());
            ObjectRenderers.Add(new ExecuteResultOutputRenderer());
            ObjectRenderers.Add(new StreamOutputRenderer());
        }
コード例 #20
0
        private readonly StringBuilder textBuffer = new StringBuilder();         // current text buffer to collect all words

        #region -- Ctor/Dtor ----------------------------------------------------------

        public SpeeDataRenderer(XmlWriter xml)
        {
            this.xml = xml;

            // Block renderes
            ObjectRenderers.Add(new ListRenderer());
            ObjectRenderers.Add(new HeadingRenderer());
            ObjectRenderers.Add(new ParagraphRenderer());
            ObjectRenderers.Add(new QuoteBlockRenderer());
            ObjectRenderers.Add(new ThematicBreakRenderer());

            // Inline renderers
            ObjectRenderers.Add(new AutolinkInlineRenderer());
            ObjectRenderers.Add(new CodeInlineRenderer());
            ObjectRenderers.Add(new DelimiterInlineRenderer());
            ObjectRenderers.Add(new EmphasisInlineRenderer());
            ObjectRenderers.Add(new LineBreakInlineRenderer());
            ObjectRenderers.Add(new LinkInlineRenderer());
            ObjectRenderers.Add(new LiteralInlineRenderer());
        }         // ctor
コード例 #21
0
        public RendererMarkdown(LayoutBuilder doc)
        {
            Layout = doc;

            ObjectRenderers.Add(new RendererBlockCode());
            ObjectRenderers.Add(new RendererBlockList());
            ObjectRenderers.Add(new RendererBlockHeading());
            ObjectRenderers.Add(new RendererBlockHtml());
            ObjectRenderers.Add(new RendererBlockParagraph());
            ObjectRenderers.Add(new RendererBlockQuote());
            ObjectRenderers.Add(new RendererBlockThematicBreak());

            ObjectRenderers.Add(new RendererInlineLink());
            ObjectRenderers.Add(new RendererInlineAutoLink());
            ObjectRenderers.Add(new RendererInlineCode());
            ObjectRenderers.Add(new RendererInlineDelimiter());
            ObjectRenderers.Add(new RendererInlineEmphasis());
            ObjectRenderers.Add(new RendererInlineLineBreak());
            ObjectRenderers.Add(new RendererInlineHtml());
            ObjectRenderers.Add(new RendererInlineHtmlEntity());
            ObjectRenderers.Add(new RendererInlineLiteral());
        }
コード例 #22
0
        public BlazorRenderer(RenderTreeBuilder builder, int sequence)
        {
            this._builder  = builder;
            this._sequence = sequence;

            ObjectRenderers.Add(new CodeBlockRenderer());
            ObjectRenderers.Add(new ListRenderer());
            ObjectRenderers.Add(new HeadingRenderer());
            ObjectRenderers.Add(new HtmlBlockRenderer());
            ObjectRenderers.Add(new ParagraphRenderer());
            ObjectRenderers.Add(new QuoteBlockRenderer());
            ObjectRenderers.Add(new ThematicBreakRenderer());

            // Default inline renderers
            ObjectRenderers.Add(new AutolinkInlineRenderer());
            ObjectRenderers.Add(new CodeInlineRenderer());
            ObjectRenderers.Add(new DelimiterInlineRenderer());
            ObjectRenderers.Add(new EmphasisInlineRenderer());
            ObjectRenderers.Add(new LineBreakInlineRenderer());
            ObjectRenderers.Add(new HtmlInlineRenderer());
            ObjectRenderers.Add(new HtmlEntityInlineRenderer());
            ObjectRenderers.Add(new LinkInlineRenderer());
            ObjectRenderers.Add(new LiteralInlineRenderer());

            //Extension renderers
            ObjectRenderers.Add(new AbbreviationRenderer());
            ObjectRenderers.Add(new DefinitionListRenderer());
            ObjectRenderers.Add(new FigureCaptionRenderer());
            ObjectRenderers.Add(new FigureRenderer());
            ObjectRenderers.Add(new FooterBlockRenderer());
            ObjectRenderers.Add(new FootnoteGroupRenderer());
            ObjectRenderers.Add(new FootnoteLinkRenderer());
            ObjectRenderers.Add(new JiraLinksRenderer());
            ObjectRenderers.Add(new MathBlockRenderer());
            ObjectRenderers.Add(new MathInlineRenderer());
            ObjectRenderers.Add(new TableRenderer());
            ObjectRenderers.Add(new TaskListRenderer());
            ObjectRenderers.Add(new YamlFrontMatterRenderer());
        }
コード例 #23
0
        public AttributedTextRenderer() : base(new CountingWriter(new StringWriter()))
        {
            // Default block renderers
            //ObjectRenderers.Add(new CodeBlockRenderer());
            ObjectRenderers.Add(new ListRenderer());
            //ObjectRenderers.Add(new HeadingRenderer());
            //ObjectRenderers.Add(new HtmlBlockRenderer());
            ObjectRenderers.Add(new ParagraphRenderer());
            //ObjectRenderers.Add(new QuoteBlockRenderer());
            //ObjectRenderers.Add(new ThematicBreakRenderer());

            // Default inline renderers
            //ObjectRenderers.Add(new AutolinkInlineRenderer());
            //ObjectRenderers.Add(new CodeInlineRenderer());
            //ObjectRenderers.Add(new DelimiterInlineRenderer());
            ObjectRenderers.Add(new EmphasisInlineRenderer());
            ObjectRenderers.Add(new LineBreakInlineRenderer());
            ObjectRenderers.Add(new HtmlInlineRenderer());
            //ObjectRenderers.Add(new HtmlEntityInlineRenderer());
            //ObjectRenderers.Add(new LinkInlineRenderer());
            ObjectRenderers.Add(new LiteralInlineRenderer());
        }
コード例 #24
0
 protected virtual void LoadRenderers()
 {
     // Default block renderers
     ObjectRenderers.Add(new CodeBlockRenderer());
     ObjectRenderers.Add(new ListRenderer());
     ObjectRenderers.Add(new HeadingRenderer());
     ObjectRenderers.Add(new ParagraphRenderer());
     ObjectRenderers.Add(new QuoteBlockRenderer());
     ObjectRenderers.Add(new ThematicBreakRenderer());
     // Default inline renderers
     ObjectRenderers.Add(new AutolinkInlineRenderer());
     ObjectRenderers.Add(new CodeInlineRenderer());
     ObjectRenderers.Add(new DelimiterInlineRenderer());
     ObjectRenderers.Add(new EmphasisInlineRenderer());
     ObjectRenderers.Add(new HtmlEntityInlineRenderer());
     ObjectRenderers.Add(new LineBreakInlineRenderer());
     ObjectRenderers.Add(new LinkInlineRenderer());
     ObjectRenderers.Add(new LiteralInlineRenderer());
     // Extension renderers
     //ObjectRenderers.Add(new TableRenderer());
     ObjectRenderers.Add(new TaskListRenderer());
 }
コード例 #25
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="FlowDocumentRenderer" /> class.
        /// </summary>
        public FlowDocumentRenderer()
        {
            // Default block renderers
            ObjectRenderers.Add(new CodeBlockRenderer());
            ObjectRenderers.Add(new ListRenderer());
            ObjectRenderers.Add(new HeadingRenderer());
            ObjectRenderers.Add(new HtmlBlockRenderer());
            ObjectRenderers.Add(new ParagraphRenderer());
            ObjectRenderers.Add(new QuoteBlockRenderer());
            ObjectRenderers.Add(new ThematicBreakRenderer());

            // Default inline renderers
            ObjectRenderers.Add(new AutolinkInlineRenderer());
            ObjectRenderers.Add(new CodeInlineRenderer());
            ObjectRenderers.Add(new DelimiterInlineRenderer());
            ObjectRenderers.Add(new EmphasisInlineRenderer());
            ObjectRenderers.Add(new LineBreakInlineRenderer());
            ObjectRenderers.Add(new HtmlInlineRenderer());
            ObjectRenderers.Add(new HtmlEntityInlineRenderer());
            ObjectRenderers.Add(new LinkInlineRenderer());
            ObjectRenderers.Add(new LiteralInlineRenderer());
        }
コード例 #26
0
        public RenderFragmentMarkdownRenderer(RenderTreeBuilder builder)
        {
            _builder = builder;

            // Block renderers
            ObjectRenderers.Add(new CodeBlockRenderer());
            ObjectRenderers.Add(new ListBlockRenderer());
            ObjectRenderers.Add(new HeadingBlockRenderer());
            ObjectRenderers.Add(new HtmlBlockRenderer());
            ObjectRenderers.Add(new ParagraphBlockRenderer());
            ObjectRenderers.Add(new QuoteBlockRenderer());
            ObjectRenderers.Add(new ThematicBreakRenderer());

            // Inline renderers
            ObjectRenderers.Add(new AutolinkInlineRenderer());
            ObjectRenderers.Add(new CodeInlineRenderer());
            ObjectRenderers.Add(new DelimiterInlineRenderer());
            ObjectRenderers.Add(new EmphasisInlineRenderer());
            ObjectRenderers.Add(new LineBreakInlineRenderer());
            ObjectRenderers.Add(new HtmlInlineRenderer());
            ObjectRenderers.Add(new HtmlEntityInlineInlineRenderer());
            ObjectRenderers.Add(new LinkInlineRenderer());
            ObjectRenderers.Add(new LiteralInlineRenderer());
        }
コード例 #27
0
 public MarkdownTransformRenderer(TextWriter writer, string originalMarkdown) : base(writer)
 {
     OriginalMarkdown = originalMarkdown;
     ObjectRenderers.Add(new ContainerBlockRenderer());
     ObjectRenderers.Add(new LeafBlockRenderer());
 }
コード例 #28
0
 public CustomHtmlRenderer(TextWriter writer) : base(writer)
 {
     ObjectRenderers.Remove(ObjectRenderers.OfType <HeadingRenderer>().First());
     ObjectRenderers.Add(new CustomHeadingRenderer());
     ObjectRenderers.Add(new HtmlTableRenderer());
 }
コード例 #29
0
 /// <summary>
 /// Load first the custom renderer's
 /// </summary>
 protected override void LoadRenderers()
 {
     ObjectRenderers.Add(new LinkInlineRenderer(_linkpath));
     base.LoadRenderers();
 }
コード例 #30
0
 public ReplacementRenderer(TextWriter writer, string originalMarkdown, Func <string, string> func) : base(writer, originalMarkdown)
 {
     ObjectRenderers.Add(new ContainerInlineRenderer(func));
 }