mdbook-graphviz icon indicating copy to clipboard operation
mdbook-graphviz copied to clipboard

Paragraph is joined to previous nested list

Open alek3y opened this issue 1 year ago • 3 comments

When the graphviz preprocessor is enabled, the list

- A
    - B
    
    C

is rendered as

  • A
    • B C

instead of

  • A

    • B

    C

alek3y avatar Sep 30 '23 11:09 alek3y

I think this might actually be an issue of pulldown-cmark-to-cmark. I'll wait confirmation before closing this.

alek3y avatar Oct 01 '23 17:10 alek3y

@alek3y I know it's been a while but is there any change you know if this bug still occurs?

Cypher1 avatar May 01 '24 12:05 Cypher1

As far as I can tell it's still happening. I just took another look at the code, and I'm pretty sure it's pulldown_cmark_to_cmark::cmark that causes this.

The events generated by pulldown_cmark::Parser seem to be correct:

[Start(List(None))],
[Start(Item)],
[Start(Paragraph)], [Text(Borrowed("A"))], [End(Paragraph)],
[Start(List(None))], [Start(Item)], [Text(Borrowed("B"))], [End(Item)], [End(List(false))],
[Start(Paragraph)], [Text(Borrowed("C"))], [End(Paragraph)],
[End(Item)],
[End(List(false))]

However, buf is then filled with * A\n \n * B\n C which produces the wrong output I mentioned.

alek3y avatar May 01 '24 14:05 alek3y