Files
pandoc/test/command/9183.md
T
Caio Vinícius 6cb2494cb8 Docx reader: merge adjacent styled code blocks (#11977)
Without `+styles`, consecutive "Source Code" paragraphs are combined
into a single code block by `combineBlocks`. With `+styles`, each
paragraph is first wrapped in a `Div` carrying its `custom-style`
attribute, so the `CodeBlock` case no longer matched and every line
became its own `Div [CodeBlock]`.

Add a case that merges adjacent `Div [CodeBlock]` blocks when both the
`Div` and the `CodeBlock` attributes are equal.

Closes #9183.
2026-10-29 12:43:19 -07:00

277 B

Adjacent "Source Code" paragraphs become one code block with +styles, as they do without it:

% pandoc -f docx+styles -t native command/9183.docx
^D
[ Div
    ( "" , [] , [ ( "custom-style" , "Source Code" ) ] )
    [ CodeBlock ( "" , [] , [] ) "x = 1\ny = x + 1" ]
]