Fix propertization for lists of dicts with literal block

previously_broken_but_now_correct:
  - bash: |
      echo "Properties following this block were broken"
    displayName: "Incorrectly propertized with face 'yaml-block-literal"
pull/81/head
Ben Strutt 2020-08-20 15:26:03 +01:00
parent 68fecb5f0d
commit 04c30eabb5
No known key found for this signature in database
GPG Key ID: 8DC9C4D134291472
2 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,8 @@
# Propertized incorrectly prior to PR
example:
- key1: Correctly propertized
key2: |
Correctly propertized.
- key3: |
Correctly propertized
key4: Incorrectly propertized as part of preceding yaml-literal-block

View File

@ -322,6 +322,8 @@ artificially limited to the value of
(unless (looking-at yaml-blank-line-re)
(setq min-level (min min-level (current-indentation))))
(forward-line -1))
(when (looking-at-p " *- ")
(setq min-level (- min-level 2)))
(cond
((and (< (current-indentation) min-level)
(looking-at yaml-block-literal-re))