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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIx colon and table indent for tabular changes #663

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 33 additions & 33 deletions test/table-format.vader
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@ Before:
After:
let &gdefault = 0

Given markdown;
| normal |no space| 2 spaces ||
| - |-| --- ||
| normal |no space| 2 spaces ||
Given markdown:
| normal |no space| 2 spaces ||
| - |-| --- ||
| normal |no space| 2 spaces ||

Execute (format unformatted table):
TableFormat

Expect (table is formatted):
| normal | no space | 2 spaces | |
|--------|----------|----------|--|
| normal | no space | 2 spaces | |
| normal | no space | 2 spaces | |
|--------|----------|----------|--|
| normal | no space | 2 spaces | |

Given markdown;
| a | b |
|---|---|
| c | d |
Given markdown:
| a | b |
|---|---|
| c | d |

Execute (format well formatted table):
TableFormat

Expect (table is not modified):
| a | b |
|---|---|
| c | d |
| a | b |
|---|---|
| c | d |

Given markdown (indented table);
Given markdown (indented table):
| a | b |
|---|---|
| c | d |
Expand All @@ -39,24 +39,24 @@ Execute (format well formatted, indented table):
TableFormat

Expect (table is not modified):
| a | b |
|---|---|
| c | d |
| a | b |
|---|---|
| c | d |

Given markdown;
| left |right| center ||
| :- | --: |:---:|:|
| left |right| center ||
Given markdown:
| left |right| center ||
| :- | --: |:---:|:|
| left |right| center ||

Execute (format table with colons):
TableFormat

Expect (preserve colons to align text):
| left | right | center | |
|:-----|------:|:------:|:--|
| left | right | center | |
| left | right | center | |
|:-----|------:|:------:|:--|
| left | right | center | |

Given markdown (indented table with colons);
Given markdown (indented table with colons):
| left |right| center ||
| :- | --: |:---:|:|
| left |right| center ||
Expand All @@ -65,11 +65,11 @@ Execute (format indented table with colons):
TableFormat

Expect (preserve colons to align text):
| left | right | center | |
|:-----|------:|:------:|:--|
| left | right | center | |
| left | right | center | |
|:-----|------:|:------:|:--|
| left | right | center | |

Given markdown (borderless table);
Given markdown (borderless table):
left |right| center
:- | --: |:---:
left |right| center
Expand All @@ -80,6 +80,6 @@ Execute (format borderless table):
unlet g:vim_markdown_borderless_table

Expect (table with borders):
| left | right | center |
|:-----|------:|:------:|
| left | right | center |
| left | right | center |
|:-----|------:|:------:|
| left | right | center |
Loading