-
Notifications
You must be signed in to change notification settings - Fork 857
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
Tables #66
Tables #66
Conversation
Thanks for this. Could we have some tests that cover at least a few common cases of tables even if they are not exhaustive? |
Sure, I'll try to have them up by today or tomorrow. 2012/10/31 Ash Berlin notifications@github.com
|
…al rule as per markdown extra
Here they are. |
Why hasn't this been merged yet? |
Two reasons, the main one being I'd forgotten about it - sorry. The second is that the change to how escapes are checked doesn't work (i.e. the tests don't pass) - I'm looking at this now. |
Great, will test as soon as you release this |
@vanthome Just tidying up a few things and aiming to fix one more thing then a 0.5 will be on its way to npm |
Hmm, are you sure that you pushed the latest version to GH?, |
You'll need to make sure you select the Maruku dialect - the default mode of operation is compatible with Gruber's vanilla script. |
Ahh ok, I document this, but it still won't work: I'm using it in the browser and doing this:
And I took my table from your test data. |
Do you get an error or it just doesn't produce the output you expected? |
no error, just the tables are rendered plain |
Oh I see. html = markdown.toHTML(data, "Maruku"); should work for you. |
I tried this actually before but try to do this in the browser console of a page where markdown-js is included:
you will see that it returns |
You need to use |
I think this does not work in the browser.
|
Sorry, my comment was a bit hasty and not all that helpful. The exposed If you just want to go from string to string with a specific dialect, then as @ashb said you just want to pass the dialect into your |
This works, excellent, thx! |
Hi, I implemented simple tables for the maruku dialect (more or less following PHP Markdown Extra's implementation), as I needed them for a project of mine where I use this lib. Tests are still missing though...
A difference is that this implementation does not force cells in a row to be created up to the maximum width of the table... don't know yet if it's a big deal.
There are also some other minor changes that ended up in the code: the correction of a leaking global variable, the parameterisation of escaped characters per dialect (markdown extra apparently needs escaping for : and |), and a break statetement to exit a loop cheking for an empty dictionary.
edit: corrected typo