Esempio n. 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()
        });
    }
Esempio n. 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);
        }
Esempio n. 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);
        }