aquirdTurtle / Collapsible_Headings

Implements Collapsible Headers for Jupyter Lab Notebooks
BSD 3-Clause "New" or "Revised" License
182 stars 8 forks source link

incorrectly_encoded_metadata for 'jp-MarkdownHeadingCollapsed' #47

Closed ebw44 closed 2 years ago

ebw44 commented 2 years ago

jupyterlab 3.2.1 jupytext 1.13.0 Collapsible_Headings (installed through 'jupyterlab extension manager', I don't know how to get the version)

With the configuration above, I get the following markdown cells:

   "metadata": {
    "incorrectly_encoded_metadata": "jp-MarkdownHeadingCollapsed=true",
    "tags": []
   },

that can progressively result in:

   "metadata": {
    "incorrectly_encoded_metadata": "jp-MarkdownHeadingCollapsed=true tags=[] jp-MarkdownHeadingCollapsed=true tags=[] jp-MarkdownHeadingCollapsed=true",
    "jp-MarkdownHeadingCollapsed": true,
    "tags": []
   },

The "incorrectly_encoded_metadata" property is produced by jupytext but it looks like Collapsible_Headings is the source of the problem because if I disable it and use the jupyterlab feature I don't get the problem https://github.com/mwouts/jupytext/blob/6fa3cab2648677bf14ddca896cdc41a699f18a49/jupytext/cell_metadata.py#L342

There is a similar issue with a solution at https://gitlab.kwant-project.org/solidstate/lectures/-/issues/74

ebw44 commented 2 years ago

Closing this issue as the https://github.com/aquirdTurtle/Collapsible_Headings/issues/45#issuecomment-898751141 is a valid solution.

PS: Thanks a lot for that extension that allow me to switch to jupyterlab without waiting for https://github.com/jupyterlab/jupyterlab/pull/10260