Stablize reformatting with Facebook style
The line number cannot be used to determine if the line should be split when
"dedenting" is specified. The reason for this is because a newline may be added
without splitting around the brackets. Then if we rerun yapf on the output, the
code will be on different lines, and therefore be formatted again.
This change doesn't rely upon the token's original line number.
Closes #210
diff --git a/CHANGELOG b/CHANGELOG
index 2bdf8ab..78c3f6b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,16 +2,16 @@
# All notable changes to this project will be documented in this file.
# This project adheres to [Semantic Versioning](http://semver.org/).
-## [0.9.0] UNRELEASED
-### Added
-- Add a knob, 'NO_SPLIT_WHEN_BIN_PACKING', that prevents splitting before the
- closing bracket of a function call if the arguments are bin packed. This is
- used in conjunction with 'DEDENT_CLOSING_BRACKETS'.
-
+## [0.8.1] UNRELEASED
### Fixed
- 'SPLIT_BEFORE_LOGICAL_OPERATOR' wasn't working correctly. The penalty was
being set incorrectly when it was part of a larger construct.
- Don't separate a keyword, like "await", from a left paren.
+- Don't rely upon the original tokens' line number to determine if we should
+ perform splitting in Facebook mode. The line number isn't the line number of
+ the reformatted token, but the line number where it was in the original code.
+ Instead, we need to carefully determine if the line is liabel to be split and
+ act accordingly.
## [0.8.0] 2016-05-10
### Added