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

Table rendering no longer working with 1.4.x #256

Closed
shaddockh opened this issue May 17, 2016 · 4 comments
Closed

Table rendering no longer working with 1.4.x #256

shaddockh opened this issue May 17, 2016 · 4 comments
Assignees
Labels

Comments

@shaddockh
Copy link

Table rendering is no longer working with the latest version. With the test code:

var showdown  = require('showdown'),
    converter = new showdown.Converter({tables: 'true'}),
    text      = ['|key|value|',
                 '|--|--|',
                 '|My Key|My Value|'].join('\n');
    html      = converter.makeHtml(text);

console.log(html);

The latest version showdown@^1.4.0 generates:

<p>|key|value|
|---|---|
|My Key|My Value|</p>

The prior versionshowdown@~1.3.0 generates it correctly as:

   <table>
   <thead>
   <tr>
   <th>key</th>
   <th>value</th>
   </tr>
   </thead>

   <tbody>
   <tr>
   <td>My Key</td>
   <td>My Value</td>
   </tr>

   </tbody>
   </table>
@tivie
Copy link
Member

tivie commented May 17, 2016

It seems the new tables regexes make table header separators require 3 dashes instead of 2.

This should work properly:

|key|value|
|---|---| 
|My Key|My Value|

This behavior was not intended, and I will release a fix as soon as possible.

@tivie tivie closed this as completed in ddaacfc May 17, 2016
@tivie tivie added the bug label May 17, 2016
@tivie tivie self-assigned this May 17, 2016
@tivie
Copy link
Member

tivie commented May 17, 2016

Issue should be fixed now

@tivie
Copy link
Member

tivie commented May 17, 2016

New release for this fix https://github.com/showdownjs/showdown/releases/tag/1.4.1

@shaddockh
Copy link
Author

Confirmed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants