Skip to content

Commit db8a9e2

Browse files
ydl7Yuri D. Lensky
and
Yuri D. Lensky
authored
Fix control characters appearing in connection file. (#563)
* Match only JSON type connection files. --------- Co-authored-by: Yuri D. Lensky <[email protected]>
1 parent d06b291 commit db8a9e2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jupyter-env.el

+4-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,10 @@ The session can be used to write a connection file, see
165165
(error "`jupyter kernel` failed to show connection file path"))
166166
(and (process-live-p process)
167167
(goto-char (point-min))
168-
(re-search-forward "Connection file: \\(.+\\)\n" nil t)))
168+
(re-search-forward (rx "Connection file: "
169+
(group (+ any) ".json")
170+
(* whitespace) line-end)
171+
nil t)))
169172
(let* ((conn-file (concat
170173
(save-match-data
171174
(file-remote-p default-directory))

0 commit comments

Comments
 (0)