TatsuyaNakamori / vscode-reStructuredText

Language Support for reStructuredText
MIT License
3 stars 2 forks source link

Code to reformat table generates unwanted characters #1

Closed lextm closed 2 years ago

lextm commented 3 years ago

While investigating an issue of Table Editor, I noticed that several lines around this tries to insert | while the purpose is unclear.

I made some changes in this commit and hope it is the right way to resolve the issue.

TatsuyaNakamori commented 3 years ago

Thanks for the bug report. I will check it out.

TatsuyaNakamori commented 3 years ago

Does the "list" described in this bug report refer to the "Cell" in the table? (The term "list" gets mixed up with the way it's displayed here , so I'll just call it "Cell" as in Excel.)

The double "|" is not a bug, it is intentional to create a line break when rendered.

If there is a single "|", the text will be displayed as two lines in reStructuredText, but when it is converted to HTML, it will be concatenated into one line. This causes the problem of different display.

I believe that the display of reStructuredText and the display when converted to HTML, etc. should match as much as possible. (I understand that you may want to write on a new line to make it easier to understand...)

So, unfortunately, I cannot agree with this change.

If there is a way to make both single and double |, I may develop a new one. Do you have any good ideas? (Do you want to allow users to choose between single and double in the user definition?)

pic_266 pic_267

TatsuyaNakamori commented 2 years ago

Close for lack of progress.

lextm commented 2 years ago

Thanks for explaining the original design. I can now see why || is important in formatting, so I will revert the changes (which now turns out to be on the wrong direction).