Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipe tables are not created when converting to HTML #121

Open
kksathesh opened this issue Nov 8, 2018 · 5 comments
Open

Pipe tables are not created when converting to HTML #121

kksathesh opened this issue Nov 8, 2018 · 5 comments

Comments

@kksathesh
Copy link

I'm trying to convert the below as a table in HTML.

Tables

Option Description
data path to data files to supply the data that will be passed into templates.
engine engine to be used for processing templates. Handlebars is the default.
ext extension to be used for dest files.

Unfortunately, my HTML output is generated as below when using CommonMark.CommonMarkConverter.Convert(...).

Tables

| Option | Description | | ------ | ----------- | | data | path to data files to supply the data that will be passed into templates. | | engine | engine to be used for processing templates. Handlebars is the default. | | ext | extension to be used for dest files. |

@kksathesh
Copy link
Author

MdAndHtml.zip

Added the zip file for reference as GitHub already converted the source md file.

@tiesont
Copy link

tiesont commented Nov 9, 2018

Seems like that should work if you added newlines. Is there a reason you have everything as a single line?

@kksathesh
Copy link
Author

DesignsInput.zip

As you can see in the attached zip, they are already in newline only. When I paste the content online here at https://dillinger.io/, it displays them properly. When I add additional newline, they are still displayed with pipes, but in new lines. But the tables is not rendered. I'm not sure what I'm missing.

@msftrncs
Copy link

msftrncs commented Nov 27, 2019

GitHub works fine if you fence the code...

Source:

| Option | Description |
| ------ | ----------- |
| data | path to data files to supply the data that will be passed into templates. |
| engine | engine to be used for processing templates. Handlebars is the default. |
| ext | extension to be used for dest files. |

Rendered by GitHub: (requires one blank line preceding)

Option Description
data path to data files to supply the data that will be passed into templates.
engine engine to be used for processing templates. Handlebars is the default.
ext extension to be used for dest files.

I cannot get CommonMark to render this. It instead renders as:

<p>| Option | Description |
|------ | -----------|
| data | path to data files to supply the data that will be passed into templates. |
| engine | engine to be used for processing templates. Handlebars is the default. |
| ext | extension to be used for dest files. |</p>

VS Code's MarkDown preview also accepted this code.

@ySirius
Copy link

ySirius commented Apr 24, 2020

Is the problem solved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants