From 32f80eb678c4dc6335063cc39975bbce2766829a Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Sat, 20 May 2017 17:49:06 +0200 Subject: Fix definition of whitespace in JSON See https://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00115.html. * lisp/json.el (json-skip-whitespace): Fix definition. * test/lisp/json-tests.el (test-json-skip-whitespace): Adapt unit test. --- lisp/json.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lisp/json.el') diff --git a/lisp/json.el b/lisp/json.el index 5f403a411b7..3def94ce042 100644 --- a/lisp/json.el +++ b/lisp/json.el @@ -206,7 +206,11 @@ Unlike `reverse', this keeps the property-value pairs intact." (defun json-skip-whitespace () "Skip past the whitespace at point." - (skip-chars-forward "\t\r\n\f\b ")) + ;; See + ;; https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf + ;; or https://tools.ietf.org/html/rfc7159#section-2 for the + ;; definition of whitespace in JSON. + (skip-chars-forward "\t\r\n ")) -- cgit v1.2.3