예제 #1
0
    public IBlockElement Execute(IBlock block)
    {
        Markdig.Syntax.ParagraphBlock paragraph = (Markdig.Syntax.ParagraphBlock)block;

        Logger.LogDebug($"The paragraph being parsed: {paragraph.Lines}");

        return(new Paragraph
        {
            Inlines = Parser.Process(paragraph.Inline)?.ToList()
        });
    }
예제 #2
0
        public void Visit(Paragraph paragraph)
        {
            var paragraphBlock = new MD.ParagraphBlock();

            _block = paragraphBlock;
            foreach (IInline inline in paragraph.Inlines)
            {
                //Visit(inline);
            }
            Document.Add(paragraphBlock);
        }
예제 #3
0
        public static string ToMarkdownString(this Markdig.Syntax.ParagraphBlock paragraphBlock)
        {
            var str = string.Empty;

            str += paragraphBlock.Inline.ToMarkdownString();
            if (paragraphBlock.IsBreakable)
            {
                str += "\n";
            }
            return(str);
        }