diff --git a/moldable-emacs.el b/moldable-emacs.el index 9329945..f9c0efd 100644 --- a/moldable-emacs.el +++ b/moldable-emacs.el @@ -2138,7 +2138,7 @@ Optionally provide DEPTH to define the number of additions asterisks to prepend (let ((keys (me-keys (car plist)))) (concat ;; header - (s-join "," (--map (s-drop 1 (symbol-name it)) keys)) + (s-join "," (--map (s-chop-left 1 (symbol-name it)) keys)) ;; entries "\n" (--> plist diff --git a/tests/moldable-emacs-test.el b/tests/moldable-emacs-test.el index b59bd2b..8018b1d 100644 --- a/tests/moldable-emacs-test.el +++ b/tests/moldable-emacs-test.el @@ -254,3 +254,10 @@ some new contents (list :example (plist-get it :name) :success t :issues nil) (plist-get mold :examples))) molds-with-examples))))) + +(ert-deftest me-plist-to-csv-string_returns-csv () + (should + (string= (me-plist-to-csv-string '((:a "1" :b "2") (:a "3" :b "4"))) + "a,b +1,2 +3,4")))