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

single column pipe table support #1218

Closed
blaenk opened this issue Apr 5, 2014 · 4 comments
Closed

single column pipe table support #1218

blaenk opened this issue Apr 5, 2014 · 4 comments
Labels

Comments

@blaenk
Copy link

blaenk commented Apr 5, 2014

Am I doing this wrong? It seems like simple_tables doesn't support a table with a single column. Now that I say "single column table" it does sound kind of stupid, to have a table with one column, but I'm curious as to why this is. I tried other table formats but couldn't get it working.

I found this old issue from 2011 that seems to have talked about it but I guess it was never followed through. It seems to work with multiline_tables but this tries to infer the column width and the items have to be separated by blank lines, it's too much of a hassle.

I ended up just doing raw html, but I figured I'd post this here in case it was forgotten.

@jgm
Copy link
Owner

jgm commented Apr 5, 2014

What did you try? Here's a one-column simple table.
Here's another one.

@blaenk
Copy link
Author

blaenk commented Apr 5, 2014

Sorry, I was in a hurry when I posted this; I should've provided a sample.

So for example I want a heading and then a list of one-line items, something like (notice they're left-aligned):

some heading
-------------
one item
two items
three items

@blaenk
Copy link
Author

blaenk commented Apr 5, 2014

Actually I tried the following, among other things:

--------
Command
--------
one

two

three
--------

It works except for the fact that a <col> tag is output which tries to set the width that the table should use. See here.

@jgm
Copy link
Owner

jgm commented Apr 16, 2014

Basically you just have to make sure that the heading doesn't get interpreted as a setext header. One way to do that (at least in pandoc's current interpretation of markdown syntax) is to indent the whole thing a couple spaces:

  head
  ----
  ok
  22

Note: it's possible that indented setext headers will be allowed at some point in the future.

It seems that one-column pipe tables don't work. I can't recall whether that was intentional (e.g. because they don't work in PHP markdown extra) or not. Will look into it. (Edit: was not intentional. PHP Markdown Extra, at least, allows one-column pipe tables. So pandoc should be fixed to allow them too.)

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

No branches or pull requests

2 participants