-
-
Save NathanCastle/b3ca963a0cef55b664a4 to your computer and use it in GitHub Desktop.
CommonMark rendering issue with HTML - example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using CommonMark; | |
namespace commonmarkdemo | |
{ | |
class MainClass | |
{ | |
public static void Main (string[] args) | |
{ | |
string spaceresult = CommonMark.CommonMarkConverter.Convert (@"# title | |
Everything below this should be pure HTML, not code: | |
<table> | |
<thead> | |
<tr> | |
<td>Head 1</td> | |
<td>Head 2</td> | |
</tr> | |
<thead> | |
<tbody> | |
<!-- We don't want this interpreted as code, but it is. --> | |
<tr> | |
<td>cell1</td> | |
<td>cell1</td> | |
</tr> | |
</tbody> | |
</table>"); | |
string nospaceresult = CommonMark.CommonMarkConverter.Convert (@"# title | |
Everything below this should be pure HTML, not code: | |
<table> | |
<thead> | |
<tr> | |
<td>Head 1</td> | |
<td>Head 2</td> | |
</tr> | |
<thead> | |
<tbody> | |
<!-- We don't want this interpreted as code, and it isn't. --> | |
<tr> | |
<td>cell1</td> | |
<td>cell1</td> | |
</tr> | |
</tbody> | |
</table>"); | |
Console.WriteLine (spaceresult); | |
Console.WriteLine ("============="); | |
Console.WriteLine (nospaceresult); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment