Skip to content

Exporting cell-metadata with "@" or "/" in their names in md:myst format #1441

@nthiery

Description

@nthiery

Description and use case

jupyterlab-slideshow (ex jupyterlab-deck) has a feature to configure the position of fragments in the page. These are configured using jupyterlab-fonts, in a cell metadata named @deathbeds/jupyterlab-fonts. Upon saving the file to md:myst, a warning is emitted:

UserWarning: The following metadata cannot be exported to the text notebook: ['@deathbeds/jupyterlab-fonts']

and indeed, that cell metadata is not exported. This prevents using this slideshow feature with md:myst notebooks.

And indeed, "/" and "@" are not accepted by jupytext as authorized characters in metadata keys:

_IS_VALID_METADATA_KEY = re.compile(r"^[a-zA-Z0-9_\.-]+$")

Is there a specific reason for excluding these characters? I have added them locally and so far everything is going smoothly.

I could provide a PR. To not do it on a character by character basis, is there some standard that we want to adhere to that would specify which characters should be accepted?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions