Skip to content

RTF reader: A List before a table ends up inside the table #11364

@TuongNM

Description

@TuongNM

Explain the problem.
In the following RTF file there is first a bulleted list which is immediately followed by a table: list-then-table.rtf

pandoc list-then-table.rtf -t native produces:

[ Table
    ( "" , [] , [] )
    (Caption Nothing [])
    [ ( AlignDefault , ColWidthDefault )
    , ( AlignDefault , ColWidthDefault )
    ]
    (TableHead ( "" , [] , [] ) [])
    [ TableBody
        ( "" , [] , [] )
        (RowHeadColumns 0)
        []
        [ Row
            ( "" , [] , [] )
            [ Cell
                ( "" , [] , [] )
                AlignDefault
                (RowSpan 1)
                (ColSpan 1)
                [ BulletList
                    [ [ Para [ Str "List" , Space , Str "item" ] ] ]
                , Para [ Str "A" ]
                ]
            , Cell
                ( "" , [] , [] )
                AlignDefault
                (RowSpan 1)
                (ColSpan 1)
                [ Para [ Str "B" ] ]
            ]
        ]
    ]
    (TableFoot ( "" , [] , [] ) [])
]

The BulletList ends up inside the first Cell instead of being its own element before the Table.

Pandoc version?
pandoc 3.8.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions