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

Markdown issue with tables #273

Closed
wants to merge 1 commit into from
Closed

Markdown issue with tables #273

wants to merge 1 commit into from

Conversation

ericmccarthy7
Copy link

The simple_tables extension in pandoc does not work with GitHub flavoured markdown. This change disables simple_tables and allows
atom-beautify to work its magic on my markdown with no issues.

the simple_tables extension in pandoc does not work with GitHub
flavoured markdown. This change disables simple_tables and allows
atom-beautify to work its magic on my markdown with no issues.
@Glavin001
Copy link
Owner

allows atom-beautify to work its magic on my markdown with no issues.

Could you add a test for this? What was not working and what it looks like now? If you want to paste input, broken output, and new (desired) output in a comment here I can turn it into a unit test.

Thanks!

@Glavin001
Copy link
Owner

Link to Tables extensions in Pandoc docs: http://pandoc.org/README.html#tables

@Glavin001
Copy link
Owner

I am not able to get it to work:

Input

Right     Left     Center     Default
-------     ------ ----------   -------
   12     12        12            12
  123     123       123          123
    1     1          1             1

Table:  Demonstration of simple table syntax.

Output

This looks messed.

  Right Le   ft   Center De   fault
  ---------- ---- ----------- -------
  12 12           12          12
  123 12     3    123         123
  1 1             1           1

  : Demonstration of simple table syntax.

@ericmccarthy7
Copy link
Author

If you make a markdown file, make a table (with pipes), and beautify it, it formats the table into an unsupported markdown for github.

For example

INPUT:

| Header One     | Header Two     |
| :------------- | :------------- |
| Item One       | Item Two       |

On github:

Header One Header Two
Item One Item Two

OUTPUT:

  Header One   Header Two
  ------------ ------------
  Item One     Item Two

On github:

Header One Header Two


Item One Item Two

Try it yourself

You can test it out in atom by typing

table

and then pressing tab (in markdown mode). Then beautify it.

I'm not the best at explaining things but hopefully this cleared it up. You can read more on github flavoured markdown here.

The change I suggest (small temporary fix, you can probably find a better one) stops the removal of pipes.

@Glavin001
Copy link
Owner

Going to be switching to Tidy-Markdown: see #292.

Looks like Tidy-Markdown has great support for all of these features, and GitHub Flavoured Markdown.

@Glavin001 Glavin001 closed this Apr 29, 2015
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

Successfully merging this pull request may close these issues.

2 participants