-
Notifications
You must be signed in to change notification settings - Fork 334
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
Require cell regex to be at beginning of line #1466
Conversation
Do I need to use |
On a regexp, no, but that's a string! |
So I do need to use |
yes, we need to escape the backslash. |
Thanks. That does make sense. |
I can't look at this right now, but I don't think changing the regexp is the right approach. I think we should update this part of the code to skip regexp matches for which |
That makes sense. I might try to find some time to look at that this weekend. I'm also trying to figure out a good way to refactor some of this code that searches for code cell boundaries in order to carry some metadata about the cell, namely if it's a Markdown cell. Essentially all that's needed to fix #1296 is knowledge about which cells are Markdown and which are code. |
Good catch. I think the approach is fine, my only hesitation is @n-riesco's comment. |
Either way, it would be good to add a test to cover this. |
See #1520 |
Currently, the regular expression used to delimit cells matches the comment symbol plus
%%
or other symbols anywhere on the line. That means that usingexport-notebook
on the following splits the string:Before:
After:
Presumably,
run-cell
would also fail on this.