Closed st-bender closed 1 year ago
Hello @st-bender , thank you for reporting this! I think the regular expression that we use to parse the metadata key does not accept -
at the moment. That should be easy to fix. Stay tuned!
Hi @st-bender , this should be fixed in the development version. Would you mind to give it a try? You can install it with
BUILD_JUPYTERLAB_EXTENSION=1 pip install git+https://github.com/mwouts/jupytext.git
Hi @mwouts that was quick, thanks a lot. Yes, it works with the dev version.
Hi,
Jupyterlab
allows collapsing (sub)sections of a notebook by clicking a little arrow beside the heading markdown cells. This helps to keep a bit of order in long notebooks, and the collapsing persists when saving and reloading the notebook. However, when pairing the notebook with apython
script (e.g. for version control), this collapsing metadata is ignored and the cells are expanded when (re)loading the notebook injupyterlab
. I found that re-collapsing the same cells and saving the paired notebook adds morejp-MarkdownHeadingCollapsed=true
entries to the markdown metadata, in the python "percent" script:and in the notebook that shows up as:
Note the
"incorrectly_encoded_metadata"
entry and despite having the"jp-MarkdownHeadingCollapsed": true,
entry, the cells are not collapsed.Saving the notebook without
jupytext
s pairing information restores the collapsing behaviour.