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

support jupytext py:percent flavor cell magic #84

Merged
merged 4 commits into from
Jul 2, 2023

Conversation

fecet
Copy link
Contributor

@fecet fecet commented Jul 1, 2023

Jupytext suggest writing cell magic in such format:

# %%
# %%time

so this is a rough implementation, but it seems to be working well.

@kiyoon
Copy link
Owner

kiyoon commented Jul 1, 2023

I think you need to do

line.strip() == "# %%"

same for lua

Because some line can unfortunately end with that format randomly

@fecet
Copy link
Contributor Author

fecet commented Jul 1, 2023

is vim.fn.trim the lua version of str.strip?

@kiyoon
Copy link
Owner

kiyoon commented Jul 1, 2023

Sounds like so, but need to confirm its behaviour

@kiyoon kiyoon merged commit 4f2fe81 into kiyoon:master Jul 2, 2023
@kiyoon
Copy link
Owner

kiyoon commented Jul 2, 2023

Thank you so much!

@fecet fecet deleted the feat/cell-magic branch July 3, 2023 03:23
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

Successfully merging this pull request may close these issues.

2 participants