Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

markdown writer: problem with block quote in lists #9908

Closed
kysko opened this issue Jun 23, 2024 · 1 comment
Closed

markdown writer: problem with block quote in lists #9908

kysko opened this issue Jun 23, 2024 · 1 comment
Labels

Comments

@kysko
Copy link

kysko commented Jun 23, 2024

Problem: If the first block of an item list is a block quote, the markdown (and commonmark_x) writer will omit the quote mark (>) on the first line of the block quote.

Consider:

*   > a
    >
    > b

The native output (pandoc -f markdown -t native) is as expected:

[ BulletList
    [ [ BlockQuote [ Para [ Str "a" ] , Para [ Str "b" ] ] ] ]
]

But converting to markdown (pandoc -f markdown -t markdown) will produce:

-   a
    >
    > b

Same for commonmark_x output.
Same problem if we use ordered lists.
(html output is ok.)

A second block quote block in the same list item will output correctly:

*   > a
    >
    > b

    > c

will give:

-   a
    >
    > b

    > c

Possible cause? In a custom writer, pandoc.layout.prefixed also caused this, possibly because it was not considered to be at the beginning of the line. So had to manually prefix the BlockQuote with layout.litteral'> '. Maybe it's similar in the Haskell code.

@kysko kysko added the bug label Jun 23, 2024
@jgm jgm closed this as completed in 965de61 Jun 23, 2024
@jgm
Copy link
Owner

jgm commented Jun 23, 2024

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants