Pb Tables
Droppix opened this issue · 1 comments
Droppix commented
Hi,
Design tables, seems doesn't work.
Any idea ?
NSString *markdown = @"|Tables|Are|Cool|\n| ------------- | : ------------- : | ----- : |\n| col 3 is | right-aligned | $1600 |\n| col 2 is | centered | $12 ";
NSString *htmlString = [MMMarkdown HTMLStringWithMarkdown:markdown
extensions:MMMarkdownExtensionsTables
error:nil];
or
NSString *htmlString = [MMMarkdown HTMLStringWithMarkdown:markdown error:nil];
Result
<p>|Tables|Are|Cool|
| ------------- | : ------------- : | ----- : |
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 </p>
Thanks
mdiep commented
You can't have spaces between the :
s and the -
s in the second row. This matches the behavior of GitHub.
This will render the output you're looking for:
|Tables|Are|Cool|
| ------------- | :-------------: | -----: |
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12