Showdown Tables Extension
One other question. Is it possible to use the tables extensions ?
Thanks
Sorry just saw the docs.
OK just tried the table extension it doesn't render the table however the Github extension work fine.
Can you please provide a reproduction via jsbin, plnkr.co, or jsfiddle?
This saves me a lot of time. Thanks!
Sure will do it later.
Sent from my iPhone
On 27 Mar 2015, at 21:15, Brian Ford [email protected] wrote:
Can you please provide a reproduction via jsbin, plnkr.co, or jsfiddle?
This saves me a lot of time. Thanks!
— Reply to this email directly or view it on GitHub.
You need to add your extension dependency :
<script src='/bower_components/showdown/src/extensions/table.js'></script>
And configure your angular app file :
.config(['markdownConverterProvider', function (markdownConverterProvider) {
markdownConverterProvider.config({
extensions: ['table']
});
}])
Your md table will be parse in html table
| Col A | Col B |
|--------- |--------- |
| Cell A1 | Cell B1 |
| Cell A2 | Cell B2 |
<table>
<thead>
<tr>
<th id="col_a" style="text-align: left;"> Col A </th>
<th id="col_b" style="text-align: left;"> Col B </th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;"><p>Cell A1 </p></td>
<td style="text-align: left;"><p>Cell B1 </p></td>
</tr>
<tr>
<td style="text-align: left;"><p>Cell A2 </p></td>
<td style="text-align: left;"><p>Cell B2 </p></td>
</tr>
</tbody>
</table>
I'm having an issue getting the tables extension to work. I've followed the noted instructions for including the tables.min.js script, as well as registering the extension, and I'm not seeing any change in behavior.
For reference, you can see the repro at: https://26-dot-perfkit-explorer.appspot.com/explore?dashboard=5750085036015616
And the commit that, based on my understanding of this thread, should have enabled the tables: https://github.com/GoogleCloudPlatform/PerfKitExplorer/commit/fc23715dc1ec5226821820e0fda49cfcbee5f911
For some reason it doesn't recognize the ":" alignment indicators, for me
this works:
| Col A | Col B |
|--------- |--------- |
| Cell A1 | Cell B1 |
| Cell A2 | Cell B2 |
And this doesn't:
| Col A | Col B |
|:--------- |:--------- |
| Cell A1 | Cell B1 |
| Cell A2 | Cell B2 |