[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/yaml-mode 6ddd552 058/124: Merge pull request #34 from ant
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/yaml-mode 6ddd552 058/124: Merge pull request #34 from antalk2/again-p2 |
Date: |
Sun, 29 Aug 2021 11:36:13 -0400 (EDT) |
branch: elpa/yaml-mode
commit 6ddd55205224c2f2c306699e021cedbaeecfaaf2
Merge: 3362e1b a96d09d
Author: Vasilij Schneidermann <v.schneidermann@gmail.com>
Commit: Vasilij Schneidermann <v.schneidermann@gmail.com>
Merge pull request #34 from antalk2/again-p2
Recognize dash-newline starting a sequence entry
---
.../test-dash-newline-starts-sequence-1.yaml | 23 +++++++++++++++
.../test-dash-newline-starts-sequence-2.yaml | 33 ++++++++++++++++++++++
yaml-mode.el | 2 +-
3 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/test-files/test-dash-newline-starts-sequence-1.yaml
b/test-files/test-dash-newline-starts-sequence-1.yaml
new file mode 100644
index 0000000..3ae484b
--- /dev/null
+++ b/test-files/test-dash-newline-starts-sequence-1.yaml
@@ -0,0 +1,23 @@
+#
+# Old behaviour (version 0.0.12)
+#
+# (1) Move to cursor to the beginning of the line containing 'aaa'
+# (2) Press TAB
+# (3) The line should be indented now.
+# Problem: the line is not indented.
+#
+# Note: in the line containing the dash ('-') there is no space character
+# after the dash, so it is not recognized as start of the sequence entry
+# by yaml-nested-sequence-re
+#
+# Proposed change:
+#
+# Change yaml-bare-scalar-re to recognize the dash-newline sequence.
+#
+# New behaviour:
+#
+# (1) Pressing TAB on the line containing 'aaa' now indents the line.
+# (2) Pressing TAB again unindents the line.
+#
+-
+aaa
diff --git a/test-files/test-dash-newline-starts-sequence-2.yaml
b/test-files/test-dash-newline-starts-sequence-2.yaml
new file mode 100644
index 0000000..f7a5341
--- /dev/null
+++ b/test-files/test-dash-newline-starts-sequence-2.yaml
@@ -0,0 +1,33 @@
+#
+# Old behaviour (version 0.0.12)
+#
+# (1) Move to cursor to the beginning of the line containing 'aaa'
+# (2) Press TAB repeatedly
+#
+# (3) The cycle of indentations of the line should include
+# the 'indented more than the previous line' state
+#
+# Problem: the line is only indented to align with
+# the dash in then previous line, but not more.
+#
+# Note: in the line containing the dash ('-') there is no space character
+# after the dash, so it is not recognized as start of the sequence entry
+# by yaml-nested-sequence-re
+#
+# Proposed change:
+#
+# Change yaml-bare-scalar-re to recognize the dash-newline sequence.
+#
+# New behaviour:
+#
+# (1) Pressing TAB on the line containing 'aaa'
+# now indents the line more than the previous line.
+#
+# (2) Pressing TAB again indents the line
+# to align with dash on the previous line.
+#
+# (3) Pressing TAB again unindents the line.
+#
+-
+ -
+ aaa
diff --git a/yaml-mode.el b/yaml-mode.el
index 3e67139..21a1d00 100644
--- a/yaml-mode.el
+++ b/yaml-mode.el
@@ -164,7 +164,7 @@ that key is pressed to begin a block literal."
"Regexp matching a line beginning a YAML block literal.")
(defconst yaml-nested-sequence-re
- (concat "^\\(?: *- +\\)+"
+ (concat "^\\(?:\\(?: *- +\\)+\\|\\(:? *-$\\)\\)"
"\\(?:" yaml-bare-scalar-re " *:\\(?: +.*\\)?\\)?$")
"Regexp matching a line containing one or more nested YAML sequences.")
- [nongnu] elpa/yaml-mode b83482e 089/124: Support double quote in implicit keys, (continued)
- [nongnu] elpa/yaml-mode b83482e 089/124: Support double quote in implicit keys, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode df66d7f 091/124: Merge pull request #59 from Kaali/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode fc7bac0 092/124: Formatting fixes, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 2522b3c 101/124: Fix typos, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 8105718 105/124: Simplify the implementation; move a comment, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode add6156 113/124: yaml-mode-syntax-propertize-function: Clear ppss cache, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode bce5aa1 011/124: changed version and added Changes, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 9d5a888 025/124: Merge pull request #6 from gvalkov/yaml-file-type, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode a87ab36 046/124: add RECRUITMENTS, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode dcdcd81 049/124: Add myself as maintainer, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 6ddd552 058/124: Merge pull request #34 from antalk2/again-p2,
ELPA Syncer <=
- [nongnu] elpa/yaml-mode 75c8f36 064/124: Unhighlight foo#bar tokens, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 1cff904 067/124: fix regex in adding yaml-mode to auto-mode-alist, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 3fc5a33 094/124: Mark block literals to unfontify quotes in them, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 41adb32 112/124: Merge pull request #77 from dgutov/single-quote-fixup, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode fea2fb0 114/124: Mention the bug report, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 97a58b3 109/124: Make sure not to pre-fill ppss cache with wrong entries, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 68fecb5 118/124: Exclude newline from `yaml-nested-map-re`, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode e142e65 008/124: added newline, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode f68472b 024/124: automatically enable yaml-mode for *.yaml files, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode cf171f4 026/124: `checkdoc' nits (including the `checkdoc-autoload' extension)., ELPA Syncer, 2021/08/29