diff --git a/README.md b/README.md index 709bc09..36831e1 100644 --- a/README.md +++ b/README.md @@ -191,6 +191,8 @@ yamlfixer currently (as of 0.6.4) can fix the following problems as reported by - trailing spaces (trailing-spaces) - truthy value should be one of [false, true] (truthy) - wrong indentation: expected + - wrong new line character: expected \\n + - wrong new line character: expected \\r\\n An always up-to-date list of fixers can be obtained with `yamlfixer --listfixers`. diff --git a/TODO.md b/TODO.md index cb6712f..a4ab538 100644 --- a/TODO.md +++ b/TODO.md @@ -10,8 +10,6 @@ release : * missing document end "..." * found forbidden document end "..." * found forbidden document start "---" -* wrong new line character: expected \\r\\n -* wrong new line character: expected \\n * forbidden implicit octal value "%s" * forbidden explicit octal value "%s" * string value is not quoted with %s quotes diff --git a/yamlfixer/problemfixer.py b/yamlfixer/problemfixer.py index 5f32ec1..b539183 100755 --- a/yamlfixer/problemfixer.py +++ b/yamlfixer/problemfixer.py @@ -94,10 +94,13 @@ def fix_missing_docstart(self, left, right): # pylint: disable=unused-argument self.ffixer.loffset += 1 def fix_newlineateof(self, left, right): # pylint: disable=unused-argument,no-self-use - """Fix: + r"""Fix: - no new line character at the end of file + - wrong new line character: expected \r\n + - wrong new line character: expected \n """ # noqa: D205, D208, D400 - # We simply ignore it, because we always add \n when dumping. + # We simply ignore it, because we always add \n when dumping + # and rely on universal newlines to handle them correctly. def fix_truthy(self, left, right): """Fix: