emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/yaml-mode ef3546b 047/124: allow spaces before '-' in yaml


From: ELPA Syncer
Subject: [nongnu] elpa/yaml-mode ef3546b 047/124: allow spaces before '-' in yaml-scalar-context-re
Date: Sun, 29 Aug 2021 11:36:10 -0400 (EDT)

branch: elpa/yaml-mode
commit ef3546b64d07e8ac31769be6e78b3598d1585d84
Author: antalk2 <antalk2@gmail.com>
Commit: antalk2 <antalk2@gmail.com>

    allow spaces before '-' in yaml-scalar-context-re
    
    # to recognize (indent and color) lala lines below
    
    - aa: dada
      bb:
      - cc: |
        lala
        lala
---
 yaml-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/yaml-mode.el b/yaml-mode.el
index 15f3872..c8a3344 100644
--- a/yaml-mode.el
+++ b/yaml-mode.el
@@ -144,7 +144,7 @@ that key is pressed to begin a block literal."
   "Regexp matching a single YAML hash key.")
 
 (defconst yaml-scalar-context-re
-  (concat "\\(?:^\\(?:--- \\)?\\|{\\|\\(?:[-,] +\\)+\\) *"
+  (concat "\\(?:^\\(?:--- \\)?\\|{\\|\\(?: *[-,] +\\)+\\) *"
           "\\(?:" yaml-bare-scalar-re " *: \\)?")
   "Regexp indicating the begininng of a scalar context.")
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]