Skip to content

Table tag surrounded by PRE is not converted correctly #352

Open
@thnbit

Description

@thnbit

Table tag surrounded by PRE with and without CODE tag is not converted correctly - See code and output below.
Same HTML code rendered by the browser shows the table just fine.

In my case, the HTML code is originating from another system where it displays as expected. I have no control over the creation of the code.
Can this issue be fixed? If not, are there any workarounds available?

string table_surrounded_by_pre_code = @"
    <pre>
        <code>
          <table style=""border-collapse:collapse; "">
            <tbody>
	      <tr>
		<td>name</td>
		<td>phone</td>
		<td>email</td>
	      </tr>
	      <tr>
		<td>John Doe</td>
		<td>202-918-2132</td>
		<td>[email protected]</td>
	      </tr>
	      <tr>
		<td>Jane Doe</td>
		<td>220-326-8196</td>
		<td>[email protected]</td>
	      </tr>
	      <tr>
            </tbody>
          </table>
        </code>
    </pre>";

string result = converter.Convert(table_surrounded_by_pre_code);
Console.WriteLine(result);

-->

name
                                                    phone
                                                    email


                                                    John Doe
                                                    202-918-2132
                                                    [email protected]


                                                    Jane Doe
                                                    220-326-8196
                                                    [email protected]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions