Closed cmichal2 closed 5 months ago
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
this isse seems to be related to https://github.com/jupyterlab/jupyterlab/issues/14752 I can confirm the problem on windows with jupyterlab-desktop version 4.0.12 and latest version.
i just submitted a pull request should be fixed soon on jupyterlab
Fantastic, thanks! I pasted your fix to replace those line endings into the javascript on the machines I'm running - and it does look like this solves it.
Bug description
If multiline text is copied in to a markdown cell (on Windows), the copy/paste produces line endings of \r\n. With further editing of the markdown, sometimes the \r and \n can become separated and then cause very strange formatting effects.
How to reproduce
Open a fresh python 3 notebook in tlhj
create a cell, change type to markdown
Open a blank document in Notepad on windows
enter four lines: Line 1 Line 2 Line 3 Line 4
Then select all lines with CTRL-A, copy with CTRL-C
Paste into the markdown cell with CTRL-V
Position cursor after the 2, and use the delete key to put Line 2 and Line 3 on the same line.
Use Shift-Enter to format the text.
Notice that the 2 is missing, even though if you double click to edit the markdown, it remains present.
Some really strange things can then happen with further editing of these lines, where bits of text get moved around to the wrong line or disappear altogether. If you save the notebook and then revert to the saved version, the errors become permanent.
Expected behaviour
Was expecting output of: Line 1 Line 2 Line 3 Line 4
Actual behaviour
Found: Line 1 Line Line 3 Line 4
Your personal set up
Distribution: the-littlest-jupyterhub, installed Oct 13.
jupyterhub version: 4.0.2 python version: 3.10.12
Full environment
pip: freeze:Configuration
```python # configuration is unedited - installed default. # jupyterhub_config.py """ JupyterHub config for the littlest jupyterhub. """ import os from glob import glob from tljh import configurer from tljh.config import CONFIG_DIR, INSTALL_PREFIX, USER_ENV_PREFIX from tljh.user_creating_spawner import UserCreatingSpawner from tljh.utils import get_plugin_manager c = get_config() # noqa c.JupyterHub.spawner_class = UserCreatingSpawner # leave users running when the Hub restarts c.JupyterHub.cleanup_servers = False # Use a high port so users can try this on machines with a JupyterHub already present c.JupyterHub.hub_port = 15001 c.TraefikProxy.should_start = False dynamic_conf_file_path = os.path.join(INSTALL_PREFIX, "state", "rules", "rules.toml") c.TraefikFileProviderProxy.dynamic_config_file = dynamic_conf_file_path c.JupyterHub.proxy_class = "traefik_file" c.SystemdSpawner.extra_paths = [os.path.join(USER_ENV_PREFIX, "bin")] c.SystemdSpawner.default_shell = "/bin/bash" # Drop the '-singleuser' suffix present in the default template c.SystemdSpawner.unit_name_template = "jupyter-{USERNAME}" tljh_config = configurer.load_config() configurer.apply_config(tljh_config, c) # Let TLJH hooks modify `c` if they want # Call our custom configuration plugin pm = get_plugin_manager() pm.hook.tljh_custom_jupyterhub_config(c=c) # Load arbitrary .py config files if they exist. # This is our escape hatch extra_configs = sorted(glob(os.path.join(CONFIG_DIR, "jupyterhub_config.d", "*.py"))) for ec in extra_configs: load_subconfig(ec) ```Logs
``` # paste relevant logs here, if any I don't see any log messages that look related. The only ones that seem even remotely possibly relevant are: Oct 18 14:10:40 xxx.xxx.xxx jupyterhub-singleuser[360391]: [W 2023-10-18 14:10:40.609 JupyterNotebookApp] 'extra_template_paths' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose. Oct 18 14:10:40 xxx.xxx.xxx jupyterhub-singleuser[360391]: [W 2023-10-18 14:10:40.521 ServerApp] A `_jupyter_server_extension_points` function was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server. ```