Skip to content

Nested tables #411

@L5tY1n

Description

@L5tY1n

Hello, I have some HTML with nested tables. Here is an example:

<table><tr><th>step</th><th>instructions</th></tr><tr><td>1</td><td><table><tr><th>condition</th><th>outcome</th></tr><tr><td>yes</td><td>approve</td></tr></table></td></tr></table>

When using ReverseMarkdown, it tries to create another Markdown table and uses <br> as newlines.
The Markdown parsers we use don't support this format.

I've looked around and apparently, the recommended way to fix this would be to output HTML.
The expected output would be

| step | instructions |
| --- | --- |
| 1 | <table><tr><th>condition</th><th>outcome</th></tr><tr><td>yes</td><td>approve</td></tr></table> |

Would it be possible to have the same mechanism as for ol or ul inside tables, and just return HTML for nested tables?

I tried to fix it manually using a child converter on my application to just return the HTML for nested tables, and it works on 4.8 with the example above, but I got into a bug in 4.7.1 because of the implementation of Tr.IsTableHeaderRow that sees the th in the nested table and decides we need to add an underline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions