reversemarkdown-net
reversemarkdown-net copied to clipboard
Table tag surrounded by PRE is not converted correctly
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]
@thnbit acknowledge seeing this issue, will check and revert to you.
@thnbit For the combination of code tag wrapped in pre tag, may be we can put the whole table content "as is". But for just pre tag, there are couple of options 1)pass the content "as is" 2)run the existing logic. Please confirm what you are thinking, will look at an appropriate fix.