Closed pmccloghrylaing closed 5 years ago
Issue #1 indicates the entire line is recognized code blocks, I think it fine to have indented code block in table cells. In this case, having the texts trimRight
and join
would be better approach (to support both nested lists and indented code blocks).
But the handling for single-line and multi-line codes has been mixed up, making it hard to apply this approach. I've been working on reconstruct the codes (as branch develop
) these days, and have this issue fixed.
The reconstruction is done, but it takes some time to test before releasing. I'm glad to merge the commit to current version if you can submit it as a PR. I will leave the code blocks unsupported for now.
Nested lists don't work in multi-line cells. As an example this produces a flat list ignoring the indent in the last row:
I've tested changes (https://github.com/pmccloghrylaing/markdown-it-multimd-table/commit/af228d20b619355db0ed7f98cdd5c91ac120d983) which will only remove the same amount of white space from the start of each line in a cell. My only concern with this approach is if it creates issues with right-aligned text (i.e. #1 - 4 spaces causing it to be treated as code) and whether this should be optional?