File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -910,6 +910,13 @@ Part of the default `cider-repl-content-type-handler-alist'."
910
910
(cider-repl--image image 'png t )
911
911
show-prefix bol))
912
912
913
+ (defun cider-repl-handle-svg (_type buffer image &optional show-prefix bol )
914
+ " A handler for inserting an svg IMAGE into a repl BUFFER.
915
+ Part of the default `cider-repl-content-type-handler-alist' ."
916
+ (cider-repl--display-image buffer
917
+ (cider-repl--image image 'svg t )
918
+ show-prefix bol))
919
+
913
920
(defun cider-repl-handle-external-body (type buffer _ &optional _show-prefix _bol )
914
921
" Handler for slurping external content into BUFFER.
915
922
Handles an external-body TYPE by issuing a slurp request to fetch the content."
@@ -924,7 +931,8 @@ Handles an external-body TYPE by issuing a slurp request to fetch the content."
924
931
(defvar cider-repl-content-type-handler-alist
925
932
`((" message/external-body" . ,#'cider-repl-handle-external-body )
926
933
(" image/jpeg" . ,#'cider-repl-handle-jpeg )
927
- (" image/png" . ,#'cider-repl-handle-png ))
934
+ (" image/png" . ,#'cider-repl-handle-png )
935
+ (" image/svg+xml" . ,#'cider-repl-handle-svg ))
928
936
" Association list from content-types to handlers.
929
937
Handlers must be functions of two required and two optional arguments - the
930
938
REPL buffer to insert into, the value of the given content type as a raw
You can’t perform that action at this time.
0 commit comments