summaryrefslogtreecommitdiffstats
path: root/src/utils.rs
AgeCommit message (Collapse)Author
2019-08-26Merge pull request #114 from phsym/printstd-nopanicPierre-Henri Symoneaux
Remove panic in print_tty and return a Result
2019-08-26Implement HTML output for Table and TableSliceJonas Bushart
* Add a HTML escaper to the utils class. * Expand TableSlice, Row, and Cell with HTML printing functions. These are implemented from scratch as they share almost nothing with the line based printing used for text, as HTML directly supports multiline cells. * Add tests to Cell and Table which test the new functionality.
2019-08-25Fixed a few clippy warnings (but not all)Pierre-Henri Symoneaux
2019-08-25Updated to rust 2018Pierre-Henri Symoneaux
2018-05-18Fixed cell width issues when using ANSI color codes.Romain
This commit adds a `utils::display_width` function, which is just a wrapper around `UnicodeWidthStr::width` which also takes ANSI color codes into account. This is required when creating cells from strings which are already colored using ANSI color codes (instead of coloring the cells using styles). Since color codes are of the form \u{1b}[ ... m, but UnicodeWidthStr::width only takes the first \u{1b} into account, this would create cell width issues.
2017-06-07Converted all try! macro uses to ? operatorPierre-Henri Symoneaux
2017-06-05Improving coverage, just for testingPierre-Henri Symoneaux
2017-06-05Fixed lint (+clippy) warnings and line endingsPierre-Henri Symoneaux
Added some lint rustc checks and fixed warnings. Fixed some clippy warnings & errors Converted remaining CRLF line endings to LF
2017-05-29Added category "command-line-interface" to Cargo.tomlPierre-Henri Symoneaux
2017-05-29TypoPierre-Henri Symoneaux
2017-05-29Applied rustfmt on codePierre-Henri Symoneaux
2017-05-29Converted all indentation tabs to 4 spacesPierre-Henri Symoneaux
Fixes #53
2016-09-11Windows specific newlines is now a default featurePierre-Henri Symoneaux
The feature is named `win_crlf` Fixes #33
2016-08-21Remove extraneous return statementsMohamed Hayibor
2016-02-14Added a note in the docstring about skipping right fillingpierresy
2016-02-14Don't fill the right part of final cell in a row when there is no right ↵pierresy
borer defined int the table format
2016-01-17Started format API refactoringpierresy
* Renamed Align enum to Alignment * Added left and right junction character customization * Added top and bottom lines customization * Added left and right borders customization
2016-01-03Updated readmepierresy
2016-01-03Implemented print_align function for #12pierresy
Implemented print_align function to replace rust's std fill/align capability.
2015-11-19Updated Cargo.toml and README.md.pierresy
Using style string don't panic anymore if some specifier are unknown. Tables and Rows are now Indexable. Empty rows are now correctly printed. New lines use "\n" for all platforms except windows (which uses "\r\n").
2015-08-12Added customizable alignmentpierresy
Added customizable alignment for text in cells (left, center, right). Also with additional small improvements
2015-06-01Fixed table! docpierresy
Code reorganisation : Created utils.rs private module