Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customizing with other similar cell header formats? #902

Open
jdtsmith opened this issue Jan 8, 2022 · 0 comments
Open

Customizing with other similar cell header formats? #902

jdtsmith opened this issue Jan 8, 2022 · 0 comments

Comments

@jdtsmith
Copy link

jdtsmith commented Jan 8, 2022

I've been working up a simple emacs recipe for fully syntactically valid source files arranged in blocks. jupytext would be ideal for conversion back and forth to notebook format. The idea is to use multi-line strings or block comments to wrap markdown blocks. This makes language servers, linters, etc. much happier. One interesting idea would be to allow slightly different header formats, somewhat like percent, but serving double duty as the nested outline section headers used in emacs, e.g.:

# * A Top-level cell
my_code()

# ** A second level cell [markdown]
r'''
-  A list
'''

# *** A 3rd level cell
print('3rd!')

Is there a convenient way to customize jupytext to target such a style?

One other thought regarding multi-line string cell_markers for Python. Ideally the starting marker would specify a raw string — r''' — so that checkers don't look inside the string and complain about invalid escape sequences (in LaTeX fragments, for example).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant