Skip to content

Commit

Permalink
Merge pull request #113 from nanobowers/unicode_support
Browse files Browse the repository at this point in the history
Unicode support and bugfixes
  • Loading branch information
nateberkopec authored Jan 26, 2021
2 parents c5647ab + 404b89c commit 9b4e880
Show file tree
Hide file tree
Showing 21 changed files with 1,875 additions and 75 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ tmp
doc
vendor
/.bundle

# tempfiles
*~
27 changes: 14 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
terminal-table (2.0.0)
terminal-table (3.0.0)
unicode-display_width (~> 1.1, >= 1.1.1)

GEM
Expand All @@ -14,26 +14,27 @@ GEM
coderay (~> 1.1)
method_source (~> 1.0)
rake (13.0.1)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.3)
rspec-support (~> 3.9.3)
rspec-expectations (3.9.3)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.0)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.4)
rspec-support (~> 3.10.0)
rspec-support (3.10.0)
term-ansicolor (1.7.1)
tins (~> 1.0)
tins (1.0.1)
unicode-display_width (1.7.0)

PLATFORMS
ruby
x86_64-linux

DEPENDENCIES
bundler (~> 2)
Expand All @@ -45,4 +46,4 @@ DEPENDENCIES
tins (~> 1.0.0)

BUNDLED WITH
2.1.4
2.2.0
36 changes: 36 additions & 0 deletions History.rdoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
3.0.0 / 2020-01-22

- Support for (optional) Unicode border styles on tables. In order to support decent looking Unicode borders, different types of intersections get different types of intersection characters. This has the side effect of subtle formatting differences even for the ASCII table border case due to removal of certain intersections near colspans.

For example, previously the output of a table may be:
+------+-----+
| Title |
+------+-----+
| Char | Num |
+------+-----+
| a | 1 |
| b | 2 |
| c | 3 |
+------+-----+

And now the `+` character above the word Title is removed, as it is no longer considered an intersection:

+------------+
| Title |
+------+-----+
| Char | Num |
+------+-----+
| a | 1 |
| b | 2 |
+------+-----+

- The default border remains an ASCII border for backwards compatibility, however multiple border classes are included / documented, and user defined border types can be applied as needed.

In support of this update, the following issues were addressed:
- colspan creates conflict with colorize (#95)
- Use nice UTF box-drawing characters by default (#99)
- Note that `AsciiBorder` is stll the default
- Border-left and border-right style (#100)
- Helper function to style as Markdown (#111)
- Achieved using `MarkdownBorder`

2.0.0 / 2020-10-28
==================

Expand Down
Loading

0 comments on commit 9b4e880

Please sign in to comment.