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

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

[elpa] master 71cdc0a 027/135: Fixed parsing bug


From: Ian Dunn
Subject: [elpa] master 71cdc0a 027/135: Fixed parsing bug
Date: Mon, 17 Feb 2020 10:52:47 -0500 (EST)

branch: master
commit 71cdc0a7e789d2816ee14ca61d064ad6db8e9902
Author: Ian D <address@hidden>
Commit: Ian D <address@hidden>

    Fixed parsing bug
    
    * org-edna.el (org-edna-parse-form): Check for whitespace in between forms.
---
 org-edna.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/org-edna.el b/org-edna.el
index 0ffc997..529900b 100644
--- a/org-edna.el
+++ b/org-edna.el
@@ -32,6 +32,7 @@ properties used during actions or conditions."
       (signal 'invalid-read-syntax (substring form pos)))
     ;; Check for either end of string or an opening parenthesis
     (unless (or (equal pos (length form))
+                (equal (string-match-p "\\s-" form pos) pos)
                 (equal (string-match-p "(" form pos) pos))
       (signal 'invalid-read-syntax (substring form pos (1+ pos))))
     ;; Parse arguments if we have any
@@ -63,6 +64,9 @@ properties used during actions or conditions."
     (when (string-match "^\\([!]\\)\\(.*\\)" (symbol-name token))
       (setq modifier (intern (match-string 1 (symbol-name token))))
       (setq token    (intern (match-string 2 (symbol-name token)))))
+    ;; Move across any whitespace
+    (when (string-match "\\s-+" form pos)
+      (setq pos (match-end 0)))
     (list token args modifier pos)))
 
 (defconst org-edna--types



reply via email to

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