3

I am trying to avoid using inline HTML to get tables working in my MD file. I have Markdown Preview and Table Editor installed via the package installer, and multimarkdown installed via homebrew, but I can't get the following text to display as a table:

| Left align adsf  | Right align | Center align |
| :--------------- | ----------: | :----------: |
| This             |        This |     This     |
| column           |      column |    column    |
| will             |        will |     will     |
| be               |          be |      be      |
| left             |       right |    center    |
| aligned          |     aligned |   aligned    |

When I "Markdown Preview" it just displays like this:

| | | Left align adsf | Right align | Center align | | --- | --- | ---------------- | ----------- | ------------ | | | | ---------------s | ----------- | ------------ | | --- | --- | :--------------- | ----------: | :----------: | | | | This | This | This | | | | column | column | column | | | | will | will | will | | | | be | be | be | | | | left | right | center | | | | aligned | aligned | aligned |

I have switched the file type to MultiMarkdown (lower right portion of ST2 screen)

I have searched, and it appears some people have a build system, or other approaches I have been unable to get going. What am I missing? If a build system is needed, how do I set up one? I am mainly interested in viewing this in HTML, but wouldn't be opposed to other ways....

chris Frisina
  • 19,086
  • 22
  • 87
  • 167

2 Answers2

2

If you switch the parser to github, it'll work just fine.

Go to Prefrences > Package Settings > Markdown Preview > Settings - User and paste this code:

{
  "parser": "github"
}
Allen Bargi
  • 14,674
  • 9
  • 59
  • 58
1

"If a build system is needed, how do I set up one?"

In OS X I would strong suggest getting the excellent Marked.app and then setting up a new build system in ST containing this trivial code

{
    "osx": {"cmd": ["open", "-a", "Marked", "$file"]},
    "selector": "text.html.markdown"
}

Then when you 'build' a markdown file (Cmd+B) you will get a preview generated in Marked.

Easy and elegant and well worth the cup-of-coffee price of Marked to avoid all the hassle of the plugin approach.

jwpfox
  • 5,124
  • 11
  • 45
  • 42