Skip to content

Multiple paragraphs in list item: only the first is rendered #145

@cosimo-lexroom

Description

@cosimo-lexroom

Hi, thanks all for the great library!

I have a issue when multiple paragraphs are nested inside list item: only the first paragraph is exported to docx.
Can you help me?

Minimal reproducible example

Setup

Using script in example/example-node.js to convert HTML to docx format.

Substitute htmlString var value with:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <title>Document</title>
    </head>
    <body>
        <div>
            <p>Test case: multiple paragraphs in a list item</p>
            <ul style="list-style-type: circle; margin-bottom: 0in; margin-top: 0px;">
                <li style="line-height: normal; margin: 0in 0in 0in 0px; font-size: 11pt; font-family: Calibri, sans-serif;">
                    <p style="font-size: 9.0pt; font-family: Arial, sans-serif;">Paragraph 1</p>
                    <p style="font-size: 9.0pt; font-family: Arial, sans-serif;">Paragraph 2</p>
                </li>
            </ul>
        </div>
    </body>
</html>

Expected result

"Paragraph 1" and "Paragraph 2" are exported.

Actual result

Only "Paragraph 1" exported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions