diff --git a/plugin/import-js.el b/plugin/import-js.el index ef68a7d..0229e05 100644 --- a/plugin/import-js.el +++ b/plugin/import-js.el @@ -42,10 +42,15 @@ (unless import-js-process (throw 'import-js-daemon "import-js-daemon not running"))) +(defun import-js-json-encode-alist (alist) + (let ((json-encoding-pretty-print nil)) + (json-encode-alist alist))) + (defun import-js-send-input (input-alist) "Append the current buffer content and path to file to a data alist, and send to import-js" - (let ((input-json (json-encode-alist (append input-alist `(("fileContent" . ,(buffer-string)) - ("pathToFile" . ,(buffer-file-name))))))) + (let ((input-json (import-js-json-encode-alist (append input-alist + `(("fileContent" . ,(buffer-string)) + ("pathToFile" . ,(buffer-file-name))))))) (process-send-string import-js-process input-json) (process-send-string import-js-process "\n")))