Skip to content

Commit

Permalink
Merge 9cfbda3 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Apr 28, 2021
2 parents d65f289 + 9cfbda3 commit 619d962
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 0.5.0
# 0.5.0+1

- Added `style` argument to switch between Markdown and MySQL
- Added `border` argument, allowing vertical and horizontal outer borders
Expand Down
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Winter | 12 | December | 31 | 258

# Formatting

### Add vertical border
## Add vertical border

``` dart
tabular(data, border: Border.vertical);
Expand All @@ -87,7 +87,7 @@ tabular(data, border: Border.vertical);
Keep in mind that only vertical borders are part of Markdown. You can add
horizontal, but then GitHub will not see it as part of the table.

### Switch border style
## Switch border style

``` dart
tabular(data, style: Style.mysql, border: Border.all)
Expand All @@ -112,7 +112,7 @@ tabular(data, style: Style.mysql, border: Border.all)
+--------+----+-----------+------+-------+
```

### Add markdown ':' alignment marks
## Add markdown ':' alignment marks

``` dart
tabular(data, markdownAlign: true)
Expand All @@ -135,7 +135,7 @@ Autumn | 11 | November | 30 | 2302
Winter | 12 | December | 31 | 258
```

### Modify alignment
## Modify alignment

``` dart
tabular(data, align: {'Name': Side.center, 'Sun': Side.start})
Expand All @@ -158,7 +158,7 @@ Autumn | 11 | November | 30 | 2302
Winter | 12 | December | 31 | 258
```

### Custom column formatting
## Custom column formatting

``` dart
tabular(data,
Expand Down Expand Up @@ -188,7 +188,7 @@ Winter | 12 | DECEMBER | 31 | + 258

# Sorting

### Sort alphabetically by column 0
## Sort alphabetically by column 0

``` dart
tabular(data, sort: [Sort(0)]) // 0 is 'Season'
Expand All @@ -210,7 +210,8 @@ Winter | 1 | January | 31 | 94
Winter | 2 | February | 28 | 123
Winter | 12 | December | 31 | 258
```
### Sort by 'Days' descending, and then by 'Sun' ascending

## Sort by 'Days' descending, and then by 'Sun' ascending

``` dart
tabular(data, sort: [Sort('Days', ascending: false), Sort('Sun')])
Expand All @@ -233,7 +234,7 @@ Summer | 6 | June | 30 | 11251
Winter | 2 | February | 28 | 123
```

### Sort with custom comparison
## Sort with custom comparison

Ordering the rows by the length of the month name.

Expand All @@ -257,7 +258,4 @@ Winter | 2 | February | 28 | 123
Autumn | 11 | November | 30 | 2302
Winter | 12 | December | 31 | 258
Autumn | 9 | September | 30 | 7025
```

###

```
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: tabular
description: Dart library for easily displaying tabular data in a visually appealing ASCII table format.
version: 0.5.0
version: 0.5.0+1
repository: https://github.com/rtmigo/tabular_dart


Expand Down

0 comments on commit 619d962

Please sign in to comment.