Skip to content

Commit c9b14dc

Browse files
committed
Improved handling of paths with spaces in the REPL (Win, macOs, Linux)
This fix is related to JunoLab/Juno.jl#421 and improves on the previous PR #731 to better handle paths with spaces in the REPL for Windows, macOS and Linux.
1 parent 40900ec commit c9b14dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/runtime/console.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ const { changeprompt, changemodule, fullpath } =
1717

1818
const isWindows = process.platform === 'win32'
1919
const uriRegex = isWindows ?
20-
/(@ ([^\s]+)\s(.*?)\:(\d+)|((([a-zA-Z]:|\.\.?|\~)|([^\0<>\?\|\/\s!$`&*()\[\]+'":;])+)?((\\|\/)([^\0<>\?\|\/!$`&*()\[\]+'":;])+)+\.[^\0<>\?\|\/\s!$`&*()\[\]+'":;]+)(\:\d+)?)/ :
21-
/(@ ([^\s]+)\s(.*?)\:(\d+)|(((\.\.?|\~)|([^\0\s!$`&*()\[\]+'":;\\])+)?(\/([^\0\s!$`&*()\[\]+'":;\\])+)+)(\:\d+)?)/
20+
/(@ ([^\s]+)\s(.*?)\:(\d+)|((([a-zA-Z]:|\.\.?|\~)|([^\0<>\?\|\/\s!$`&*()\[\]+'\":;])+)?((\\|\/)([^\0<>\?\|\/\n\r!$`&*()\[\]+'\":;])+)+(\.|\\|\/)[^\0<>\?\|\/\s!$`&*()\[\]+'\":;]+)(\:(\d+))?)/ :
21+
/(@ ([^\s]+)\s(.*?)\:(\d+)|(((\.\.?|\~)|([^\0\s!$`&*()\[\]+'":;\\])+)?(\/([^\0\n\r!$`&*()\[\]+'":;\\])+)+(\.|\/)[^\0\s!$`&*()\[\]+'":;\\]+)(\:\d+)?)/
2222

2323
var whitelistedKeybindingsREPL = []
2424
var whitelistedKeybindingsTerminal = []

0 commit comments

Comments
 (0)