walle / gimli

Utility for converting markup files to pdf files
https://github.com/walle/gimli
MIT License
538 stars 44 forks source link

Support for markdown table #34

Closed yecine06 closed 11 years ago

yecine06 commented 11 years ago

Hello,

I am interested to know if you are planning to support more markdown markups, for exemple the tables like this

Colons can be used to align columns.

Tables Are Cool
col 3 is right-aligned $1600
col 2 is centered $12
zebra stripes are neat $1
| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1600 |
| col 2 is      | centered      |   $12 |
| zebra stripes | are neat      |    $1 |
LeonB commented 11 years ago

+1

walle commented 11 years ago

There is a extension to redcarpet to add support for tables. I guess the tricky part is getting the extension to load in https://github.com/github/markup. I don't know if they will accept a patch with the extension loaded. Otherwise we will have to load the extension in gimli, or change the markup library used. Perhaps wrap the most common markup formats in our own renderer. I only use markdown (and sometimes textile, but more frequently before), but perhaps people out there use the other supported markups?

Is it acceptable to change the markups supported to only markdown (and perhaps textile?)? What are your opinions?

I would be happy to take a look at this and make it possible to use tables in gimli pdfs.

arvearve commented 11 years ago

:+1: , wouldn't mind restricting to Markdown at all, Because I only use gimli for markdown anyway :)

paynerc commented 11 years ago

Do tables work at all with gimli? I have tables in a markup file, and they just plain aren't working. Using the example above I am getting output of:

| Tables | Are | Cool || ------------- |:-------------:| -----:|| col 3 is | right-aligned | $1600 || col 2 is | centered | $12 || zebra stripes | are neat | $1 |

walle commented 11 years ago

I have support for this in this branch https://github.com/walle/gimli/tree/fix_autolinks_and_tables_in_markdown

I will try to merge this in to version 0.5.0