示例#1
0
        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());
        }
示例#2
0
        public void Test3()
        {
            var pipeline = new MarkdownPipelineBuilder()
                           .Use <VariableExtension>()
                           .Build();

            var doc = MarkdownParser.Parse("# Hallo\r\n## Test\r\n$(Test)\r\nTest", pipeline);

            var adf      = new AdfDocument();
            var renderer = new AdfRenderer(adf);

            pipeline.Setup(renderer);

            renderer.Render(doc);
        }