takumisoft68 / vscode-markdown-table

A vscode extension to add markdown table features.
Apache License 2.0
106 stars 10 forks source link

Wont align correctly. always crews up second line: #42

Open exocode opened 2 years ago

exocode commented 2 years ago

Wont align correctly. It always screws up second line:

try this raw code:

| attribute_was(attr_name)              | attribute_in_database(attr_name)          | current database value of attribute                       |
| attribute_change(attr_name)           | attribute_change_to_be_saved              | the changed value for attribute                           |
| attribute_changed?(attr_name)         | will_save_change_to_attribute?(attr_name) | was attribute modified since last save                    |
|                                       | attribute_before_last_save(attr_name)     | attribute value from before last save changed             |
| changed                               | changed_attribute_names_to_save           |  name of attributes with changed values since last save   |
| changes                               | changes_to_save                           | => the changes to be saved to DB                          |
| changed?                              | has_changes_to_save?                      | are there any changes to be saved to the DB?              |
| changed_attributes                    | attributes_in_database                    | => Hash of attribute names & new unsaved values           |
| changed?                              | has_changes_to_save?                      | record has unsaved changes                                |
|                                       | saved_changes?                            | did last save change record attributes?                   |
|                                       | saved_changes                             | => Hash of all changes in last save                       |
|                                       | saved_change_to_attribute?(attr_name)     | did attribute change when record last saved?              |
|                                       | saved_change_to_attribute(attr_name)      | => array of original & saved value from last save         |

which results in that:


| attribute_was(attr_name)      | attribute_in_database(attr_name)          | current database value of attribute                    |
| a---------------------------) | a---------------------------------------d | t----------------------------------------------------e |
| attribute_changed?(attr_name) | will_save_change_to_attribute?(attr_name) | was attribute modified since last save                 |
|                               | attribute_before_last_save(attr_name)     | attribute value from before last save changed          |
| changed                       | changed_attribute_names_to_save           | name of attributes with changed values since last save |
| changes                       | changes_to_save                           | => the changes to be saved to DB                       |
| changed?                      | has_changes_to_save?                      | are there any changes to be saved to the DB?           |
| changed_attributes            | attributes_in_database                    | => Hash of attribute names & new unsaved values        |
| changed?                      | has_changes_to_save?                      | record has unsaved changes                             |
|                               | saved_changes?                            | did last save change record attributes?                |
|                               | saved_changes                             | => Hash of all changes in last save                    |
|                               | saved_change_to_attribute?(attr_name)     | did attribute change when record last saved?           |
|                               | saved_change_to_attribute(attr_name)      | => array of original & saved value from last save      |
takumisoft68 commented 2 years ago

@exocode

You have to follow the table spec of gfm. 2nd line is delimiter row. Your grammee is not consisting a table correctly.

https://github.github.com/gfm/#tables-extension-