This PR updates the regex used by the base_url_from_window_location function. This function tries to determine the base URL of the Jupyter server, but previously failed if the path to the current notebook included notebook (or lab or voila). This PR changes the regex to be a 'lazy' or 'non-greedy' regex which means it will match the first occurrence of notebook/lab/etc rather than the last - and therefore extract the correct base URL.
This PR updates the regex used by the
base_url_from_window_location
function. This function tries to determine the base URL of the Jupyter server, but previously failed if the path to the current notebook includednotebook
(orlab
orvoila
). This PR changes the regex to be a 'lazy' or 'non-greedy' regex which means it will match the first occurrence ofnotebook
/lab
/etc rather than the last - and therefore extract the correct base URL.