-
Notifications
You must be signed in to change notification settings - Fork 15
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If row/column data contains a pipe character then Format Under Cursor doesn't work #33
Comments
Confirm that this is a bug and it occurs only in markdown mode. Also here one thing should be considered: when some row have more columns than other table, should column be deleted in this row or whole table should have 1 more column? In GFM priority goes to the header row, so if any other row has more columns, they will not be displayed, however this might be not very convenient for table editing. |
Personally, I don’t think I’d want a new column created. I ran into this because I wanted to actually have a pipe character in my cell data, but that obviously makes parsing quite difficult, and probably shouldn’t be allowed. |
In markdown pipe character is allowed, but you need to escape it with "\". In org, pipe characters aren't allowed.
|
Hi @wyldphyre, I've fixed this bug. PR: #35 In this fix I implemented second approach for now. That's the one where "whole table should have 1 more column". I'll raise another issue with lower priority to add an option which will allow to select another algorithm of reformatting. Once all checks will complete and build will be successful, I'll merge this PR and update extension in marketplace. |
Thank you |
* Fixed markdown parser Fixes #33. Problem was caused by parser, which didn't set appropriate column widths when separator row is present in table.
If a cell contains a pipe character then the "Format Under Cursor" command doesn't do anything. It would be nice if it was able to work this out, but maybe it isn't possible.
Here is an example of table that won't format:
The text was updated successfully, but these errors were encountered: