-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Adding Support for GFM Tables #74
Conversation
Any chances that it will be merged? |
+1 for merging this into master! |
+1 We need this! |
+1 |
2 similar comments
+1 |
+1 |
++1 |
Will look at this later. |
So, is this happening? I'd love it too |
Awesome. Thank you! On Jan 3, 2013, at 7:29 AM, "Christopher Jeffrey" <[email protected]mailto:[email protected]> wrote: So, I spent a little while fixing/optimizing/refactoring @kitsonkhttps://github.com/kitsonk's implementation a little bit. I'm going to consider this feature experimental for a little while. You can disable it with the tables option. @kitsonkhttps://github.com/kitsonk, thank you for the PR. — |
Just a quick test. testing paragraph
testing testing
paragraph
| one | two |
| ----- | ----- |
| 3 | 4 |
testing |
Once more. testing
testing And one other: paragraph var foo = 1; test
strike code: |
how to escape | in gfm table? |
Best thing to do use use the HTML entity: |
How to escape | in a|a |
That appears to be an issue with the sundown parser that GitHub uses as well, so technically it is feature parity:
Renders as:
|
Just realised, there is a way around this:
Will render as:
In both marked and sundown. |
Is there any way to actually set the width of a table column? |
Via CSS... |
@kitsonk I mean through markdown so some tables will be rendered bigger or smaller depending on width % set? I am basically thinking how good this will be for writing documents that have tables in them. |
It isn't part of the standard it is based on, and for good reason. Hard coding presentation in the markup doesn't allow flexibility when it renders. The only potential imrpovement would be to allow the specification of a class for a table, but again, none of the standards out there specify that, so I suspect @chjj wouldn't be interested in adding it, though there are some other issues here that talk about allowing some form of customisation of the output. You can always use |
Anyone else having trouble getting tables to render using marked?
returns this
|
Here is a modified pull request that only adds support for tables that are supported (but undocumented) as part of GFM. It is implemented in the same fashion as other GFM features. It appears to be fully compatible with the Sundown library (which is the markdown parser GFM is based on), though it is strictly based on the PHP Markdown Extra who appears to have introduced the "standard".
The following:
Will render as: