diff --git a/tests/rules/test_indentation.py b/tests/rules/test_indentation.py index 2733ea7..7d2f966 100644 --- a/tests/rules/test_indentation.py +++ b/tests/rules/test_indentation.py @@ -589,6 +589,9 @@ class IndentationTestCase(RuleTestCase): ' date: 1969\n' ' - name: Linux\n' ' date: 1991\n' + ' k4:\n' + ' -\n' + ' k5: v3\n' '...\n', conf) conf = 'indentation: {spaces: 2, indent-sequences: true}' self.check('---\n' diff --git a/yamllint/rules/indentation.py b/yamllint/rules/indentation.py index 432c23c..fb14faf 100644 --- a/yamllint/rules/indentation.py +++ b/yamllint/rules/indentation.py @@ -399,6 +399,10 @@ def _check(conf, token, prev, next, nextnext, context): # - item 1 # - item 2 indent = next.start_mark.column + elif next.start_mark.column == token.start_mark.column: + # - + # key: value + indent = next.start_mark.column else: # - # item 1