Skip to content

Commit 0ec264f

Browse files
committed
stable 1.0
1 parent 9683dfb commit 0ec264f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

json-mode.el

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
;;; json-mode.el --- Major mode for editing JSON files
22
;;; Author: Josh Johnston
33
;;; URL: https://github.com/joshwnj/json-mode
4-
;;; Version: 0.1.2
4+
;;; Version: 1.0.0
55

66
;;;;
77
;; extend javascript-mode's syntax highlighting
88

99
(defvar json-mode-hook nil)
1010

1111
(defconst json-quoted-key-re "\\(\"[^\"]+?\"[ ]*:\\)")
12-
(defconst json-quoted-string-re "\\(\".*?\"\\)")
12+
(defconst json-quoted-string-re "\\(\".*?\"\\)")
1313
(defconst json-number-re "[^\"]\\([0-9]+\\(\\.[0-9]+\\)?\\)[^\"]")
1414
(defconst json-keyword-re "\\(true\\|false\\|null\\)")
1515

1616
(defconst json-font-lock-keywords-1
17-
(list
17+
(list
1818
(list json-quoted-key-re 1 font-lock-keyword-face)
1919
(list json-quoted-string-re 1 font-lock-string-face)
2020
(list json-keyword-re 1 font-lock-constant-face)
@@ -29,10 +29,10 @@
2929
;; Beautify json with support for non-ascii characters.
3030
;; Thanks to https://github.com/jarl-dk for this improvement.
3131
(shell-command-on-region b e
32-
(concat (if (executable-find "env") "env " "")
33-
(concat (if (executable-find "python2") "python2" "python")
34-
" -c 'import sys,json; data=json.loads(sys.stdin.read()); print json.dumps(data,sort_keys=True,indent=4).decode(\"unicode_escape\").encode(\"utf8\",\"replace\")'"))
35-
(current-buffer) t)))
32+
(concat (if (executable-find "env") "env " "")
33+
(concat (if (executable-find "python2") "python2" "python")
34+
" -c 'import sys,json; data=json.loads(sys.stdin.read()); print json.dumps(data,sort_keys=True,indent=4).decode(\"unicode_escape\").encode(\"utf8\",\"replace\")'"))
35+
(current-buffer) t)))
3636

3737
;;;###autoload
3838
(define-derived-mode json-mode javascript-mode "JSON"

0 commit comments

Comments
 (0)