trentm / trentm/python-markdown2

Can't add a soft line break within a wiki-table

Open
#153 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.8k
Forks
459
Avg merge
2d 19h
Merged PRs (30d)
4

Description

I input:

|| test1 || test 2 ||
|| cell 1 || cell 2
cell 2 continued ||

where there are no spaces after "cell 2". The usual markdown convention is that a line break without two trailing spaces should create a new line.

The expected output would be:

test 1 test 2
cell 1 cell 2 cell 2 continued

but it actually outputs

<table>\n<tbody>\n<tr><td>test 1</td><td>test 2</td></tr>\n</tbody>\n</table>\n\n<p>|| cell1 || cell2\ncell2 continued ||</p>\n

I'm not sure if this is intentional or not, but it seems backwards/inconsistent from the normal markdown conventions (it's surprising) and is not documented.

If we can't get this fixed, would it be possible to add explicit line continuations?

Maybe something like

|| test1 || test 2 ||
|| cell 1 || cell 2 \
cell 2 continued ||

At the very least could we get this documented at https://github.com/trentm/python-markdown2/wiki/wiki-tables

Related issue: https://github.com/trentm/python-markdown2/issues/66

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the wiki-table example from the issue and compare its output with the stated Markdown line-break convention. Review related issue #66 and the wiki-tables page; done means the behavior is resolved with tests or the limitation and any continuation syntax are explicitly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.