about summary refs log tree commit diff
path: root/src/string.rs
AgeCommit message (Collapse)AuthorLines
2017-05-03Format source codestopecongiro-4/+1
2017-03-28fallout - source reformattingNick Cameron-1/+4
2017-03-28Source formatting falloutNick Cameron-1/+2
2017-02-26bump regex to 0.2Igor Gnatenko-1/+1
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-02-23FalloutNick Cameron-2/+2
2017-02-21WIPNick Cameron-2/+3
2017-01-31Refactor indent and width into Shape structNick Cameron-8/+6
2017-01-06If a string goes over-width, give up formatting itNick Cameron-1/+2
Logic here is that the original might be better and at best we'll only make it a different kind of bad. Fixes #1237
2016-04-22Change defaults and update tests and sourceNick Cameron-2/+2
New defaults are `Tabbed` for `chain_indent` and `chain_base_indent`, and `5` for `closure_block_indent_threshold`.
2016-04-11Don't be so aggressie about line-breaking strings (#911)Nick Cameron-16/+32
We will no longer break in the middle of words, only at whitespace or punctuation. This means we sometimes over-run, but that seems better than some of the bad splits we see. Closes #369
2016-03-28Use checked_next_power_of_two from std instead of custom methodKamal Marhubi-2/+3
NB The custom method returned 0 on an input of 0, which is arguably incorrect: 0 is not a power of two; the method in `std` returns 1 in that case.
2015-12-25Prevent incorrect backslash removal in stringsMarcus Klaas-5/+5
2015-12-12Prevent backslash stripping in string literalsMarcus Klaas-4/+3
2015-10-02infinite while loop fixed, redundancy removedAlex-7/+3
2015-10-02Added punctuation preferencesezna-4/+16
Create test.rs Delete test.rs Fixed compile error. Trying a possible fix on an arithmetic overflow another try at the test failure... passed all tests. Added tests and cleaned up logic as per nrc's critiques Delete string.rs.old Delete string.rs.bk Made changes as per nrc's requests. Update string_punctuation.rs Update string_punctuation.rs fixed logical redundancy
2015-09-25Make rewrite_string return `Option<String>`Marcus Klaas-8/+31
2015-09-19Add Indent::none(), remove make_indent.Pavel Sountsov-2/+2
2015-09-19Initial implementation of hard tab indentation.Pavel Sountsov-2/+5
2015-09-11Implement basic chain formattingMarcus Klaas-2/+2
2015-09-09Small style fixes.Sinh Pham-5/+4
2015-09-03Support unicode in string literals.Sinh Pham-20/+24
2015-06-26Update import list formattingMarcus Klaas-13/+0
Include comments and sort items alphabetically.
2015-06-23Format tuple-like structsMarcus Klaas-0/+103