aaren/notedown

Issue with Tables due to Linewrap

thomelane opened this issue · 1 comments

When exporting from Notebook to MD, the lines are wrapped to 80 characters.
When the Notebook contains tables with rows longer than 80 characters, the lines are wrapped but this causes issues with how the table is rendered (Github for example).
Most rendering assumes the wrapped line is a new row in the table, and the table is not rendered correctly.

Could a command line argument be added to allow setting the line wrap? On or off, or width?

Correct formatting (without line wrap):

| H1 | H2 |
|:---  |:---  |
|This is an example | Of what happens with line wrap |
H1 H2
This is an example Of what happens with line wrap

Incorrect formatting (with line wrap):

| H1 | H2 |
|:---  |:---  |
|This is an example | Of what
happens with line wrap |
H1 H2
This is an example Of what
happens with line wrap

check out the call to wordwrap:

notedown/templates/markdown.tpl

{{ cell \| create_input_codeblock }}
--
5 | {% endblock input %}
6 |  
7 | {% block markdowncell scoped %}
8 | {{ cell.source \| wordwrap(80, False) }}
9 | {% endblock markdowncell %}

deleting the wordwrap call removes all wrapping in the output.