Closed Nyazira closed 6 months ago
Try
MarkdownDocument document = Markdown.Parse(content, pipeline);
foreach (HeadingBlock heading in document.Descendants<HeadingBlock>())
{
Console.WriteLine(heading.GetAttributes().Id);
}
string html = document.ToHtml(pipeline);
Try
MarkdownDocument document = Markdown.Parse(content, pipeline); foreach (HeadingBlock heading in document.Descendants<HeadingBlock>()) { Console.WriteLine(heading.GetAttributes().Id); } string html = document.ToHtml(pipeline);
Thank you,it works!
If markdown is as follows:
then it generates the following code:
Since markdown's title contains both Chinese and English characters, I can't predict what kind of Identifier the title will generate. Is there any way to get a list of identifiers? So I can generate a directory from the list.