[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/yaml-mode ed7ec2e 111/124: Don't freeze on unclosed string
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/yaml-mode ed7ec2e 111/124: Don't freeze on unclosed strings |
Date: |
Sun, 29 Aug 2021 11:36:23 -0400 (EDT) |
branch: elpa/yaml-mode
commit ed7ec2e83c0e0123c72a4699ae9a9656d521e284
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Don't freeze on unclosed strings
---
test-files/test-quotes-in-strings.yaml | 1 +
yaml-mode.el | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/test-files/test-quotes-in-strings.yaml
b/test-files/test-quotes-in-strings.yaml
index 5859bbd..07137a9 100644
--- a/test-files/test-quotes-in-strings.yaml
+++ b/test-files/test-quotes-in-strings.yaml
@@ -3,3 +3,4 @@ some's'strings'some's'nots:
- this: 'is a string with "quotes"'
- and: 'to express one single quote, use '' two of them'
- finally: syntax is not string
+- singlequotedoesntfreeze: '
diff --git a/yaml-mode.el b/yaml-mode.el
index 66e41b3..6bd4000 100644
--- a/yaml-mode.el
+++ b/yaml-mode.el
@@ -284,7 +284,10 @@ that key is pressed to begin a block literal."
;; We're right after a quote that opens a string literal.
;; Skip over it (big speedup for long JSON strings).
(goto-char (1- pt))
- (ignore-errors (forward-sexp)))))))))
+ (condition-case nil
+ (forward-sexp)
+ (scan-error
+ (goto-char end))))))))))
(defun yaml-font-lock-block-literals (bound)
"Find lines within block literals.
- [nongnu] elpa/yaml-mode cecf4b1 102/124: Merge pull request #74 from DamienCassou/typos, (continued)
- [nongnu] elpa/yaml-mode cecf4b1 102/124: Merge pull request #74 from DamienCassou/typos, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode e9696eb 106/124: Fix a thinko, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode e1aed40 107/124: Fix maintainer email, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 00c2428 099/124: Fix typo, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode fc5e1c5 121/124: Bump version, summarize changes, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 04ef268 103/124: Add test example with quotes in strings, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 3a57058 122/124: Pacify package-lint, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 1c3ade4 081/124: Merge pull request #46 from pkulev/fix-typo, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode e3b06b2 088/124: Support non-whitespace preceded apostrophe, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 40067a1 096/124: Merge pull request #62 from ts4z/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode ed7ec2e 111/124: Don't freeze on unclosed strings,
ELPA Syncer <=
- [nongnu] elpa/yaml-mode c7c2994 090/124: Support escaped quote in a single quoted string, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 05ae757 108/124: Don't fall through the first case, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 34648f2 117/124: Add comment test file, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 831ef3a 120/124: Merge pull request #81 from strutt/master, ELPA Syncer, 2021/08/29