-
Notifications
You must be signed in to change notification settings - Fork 10
Please support reduced table syntax #20
Comments
Hi, thanks for you suggestion! Such reduced syntax is currently not supported since it becomes unclear whether a given text is a table or not. Is the following line is a table header or not? The vertical bar | is sometimes called "pipe". Is the following line is a table header or a list item? + The vertical bar | is sometimes called "pipe". With leading pipes, it is much clear for both parsers and users to recognize. Actually I sometimes use the reduced syntax when I have trouble with typing many pipes, but with this package I have no trouble 😄 |
Well, I rely on what GitHub treats as a table. Is it possible to make this syntax work when grammar is set to |
Good idea! Suppose you have one of the following lines, and the cursor is in it. The vertical bar | is sometimes called "pipe". name | description `let cond = foo || bar` Should it be formatted as a table? or should the editor simply insert a newline character? The last one is both a valid code span and a valid table row with three cells (!) according to the GitHub Flavored Markdown Spec. `let cond = foo || bar`
-|-|- yields the following table:
|
What I'm more concerned about is not the autocomplete behavior when I hit enter, but rather the automatic reformat when I save the file. If it was possible I think it is optimal to not autocomplete
on the file save automatically. GitHub renders it as a table anyway, so it's fine if we do. But
can be viewed as a non-ambigous table, because there are few reasons to put My usecase is that I have files with reduced syntax used and I want them to be reformatted. But I'm okay with that it doesn't autocomplete the table when I just write the reduced header What do you think? |
OK, I understand your use case 👍 Since I made this package mainly focusing on creating tables from scratch, formatting already existing tables has not been considered very much. The current code is specialized for only one syntax, and supporting other syntax will be a bit challenging task. Thank you for the discussion! |
The following is correct syntax for a markdown table:
If you put this on github it will be rendered properly:
However it seems like this is not recognized by the plugin. Can you please support the syntax too?
The text was updated successfully, but these errors were encountered: