Skip to content

Commit

Permalink
Fix control characters appearing in connection file. (#563)
Browse files Browse the repository at this point in the history
* Match only JSON type connection files.

---------

Co-authored-by: Yuri D. Lensky <[email protected]>
  • Loading branch information
ydl7 and Yuri D. Lensky authored Dec 3, 2024
1 parent d06b291 commit db8a9e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jupyter-env.el
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ The session can be used to write a connection file, see
(error "`jupyter kernel` failed to show connection file path"))
(and (process-live-p process)
(goto-char (point-min))
(re-search-forward "Connection file: \\(.+\\)\n" nil t)))
(re-search-forward (rx "Connection file: "
(group (+ any) ".json")
(* whitespace) line-end)
nil t)))
(let* ((conn-file (concat
(save-match-data
(file-remote-p default-directory))
Expand Down

0 comments on commit db8a9e2

Please sign in to comment.