Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiline functionality v3 vs v4 #35

Open
oldrich-svec opened this issue Mar 11, 2021 · 6 comments
Open

Multiline functionality v3 vs v4 #35

oldrich-svec opened this issue Mar 11, 2021 · 6 comments

Comments

@oldrich-svec
Copy link

oldrich-svec commented Mar 11, 2021

For the following:

     x     |    x
-----------|-----------
test1      | test2 \
           |  \
           | test3

v3.1.3 produces:

image

whereas v4.0.3 gives:

image

Is it a regression bug or a feature? 馃槉

@redbug312
Copy link
Owner

Yes, that's a bug.
It seems caused by incorrect pipes scanning, as done in 6b2c2ea.
And I may fix this in few days.

@dk-teknologisk-mnm
Copy link

dk-teknologisk-mnm commented Apr 14, 2021

@redbug312 What is the current status on this bug? I need some of the functionality in version 4 of multimd-table, but I can't update it before the bug has been fixed, since my code would otherwise break.

redbug312 added a commit that referenced this issue Apr 15, 2021
@redbug312
Copy link
Owner

@dk-teknologisk-mnm Sorry for the long delay, I was busy with other things and have no time to check until recently. This bug is fixed and published as v4.1.0.

@dk-teknologisk-mnm
Copy link

No worries and thank you for fixing the bug. It seems to work as it should. :-)
I did encounter another thing.

    1     |     2
----------|----------
Test 1    |          \
          | Result 1 \
          | 
Test 2    | Result 1 \
          |          \
          | Result 2 \
          |

When I write the above I expect it to give:

1                    2

Test 1               Result 1
Test 2               Result 1 Result 2

But instead it does not render 'Result 1' in 'Test' 1 at all:

1                     2

Test 1		
Test 2                Result 4 Result 5

Is this a bug or is it expected behaviour?

@redbug312
Copy link
Owner

redbug312 commented Apr 20, 2021

It's an implementation bug. Because the current parser assumes:
The first line of a multi-line contains exactly the number of cells.

So the 2nd cell of the fourth line got ignored, as the third line contains 1 cell only (slash excluded).
But since the assumption really simplifies the code,
I'll leave this open until there's a simple solution to this bug.

@dk-teknologisk-mnm
Copy link

Okay. If it can be of any use, here is an explanation of the use-case where I get the bug.
I have a table where I have several if-statements. In order to make it readable this spans over several lines in the table.
So it would look like this:

   1   |   2
------ | ------
Test 1 | {{#if something}} \
       | Text 1            \
       | {{else}}          \
       | Text 2            \
       | {{/if}}

... which if statement is true then becomes this in markdown:

   1   |   2
------ | ------
Test 1 |          \
       | Text 1   \
       |          \
       |          \
       | 

So this is why I get the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants