diff options
| -rw-r--r-- | AUTHORS | 1 | ||||
| -rw-r--r-- | CHANGES | 4 | ||||
| -rw-r--r-- | tests/test_regressions.py | 5 |
3 files changed, 10 insertions, 0 deletions
@@ -26,6 +26,7 @@ Alphabetical list of contributors: * Robert Nix <com.github@rnix.org> * Rocky Meza <rmeza@fusionbox.com> * Ryan Wooden <rygwdn@gmail.com> +* Shen Longxing <shenlongxing2012@gmail.com> * spigwitmer <itgpmc@gmail.com> * Tim Graham <timograham@gmail.com> * Victor Hahn <info@victor-hahn.de> @@ -9,6 +9,10 @@ Internal Changes sqlparse.exceptions. * sqlparse.sql.Token.to_unicode was removed. +Bug Fixes +* Leading whitespaces are now removed when format() is called with + strip_whitespace=True (issue213, by shenlongxing). + Release 0.1.18 (Oct 25, 2015) ----------------------------- diff --git a/tests/test_regressions.py b/tests/test_regressions.py index 50592c5..ca7dd5b 100644 --- a/tests/test_regressions.py +++ b/tests/test_regressions.py @@ -286,3 +286,8 @@ def test_issue212_py2unicode(): t2 = sql.Token(T.String, u"bug") l = sql.TokenList([t1, t2]) assert str(l) == 'schöner bug' + + +def test_issue213_leadingws(): + sql = " select * from foo" + assert sqlparse.format(sql, strip_whitespace=True) == "select * from foo" |
