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

Fix folding of cells #1659

Merged
merged 1 commit into from
Jun 14, 2019
Merged

Fix folding of cells #1659

merged 1 commit into from
Jun 14, 2019

Conversation

wadethestealth
Copy link
Member

Closes #1508

@aviatesk
Copy link
Member

@wadethestealth
Thanks for addressing this issue ! Your fix works.

As a further fix, I wonder you feel like you can fix this too ?
fold-current-cell for multiple grammar files (like markdown) can fold multiple cells if invoked on header of cell. Please refer to the example below:

Before folding:
image

After folding (dispatch on ```python):
image

@wadethestealth
Copy link
Member Author

@aviatesk Currently this is impossible. We currently detect for embedded scopes, which the header is not apart of. The other way to detect would be a markdown code block, but this is specific to markdown and if two code blocks have no blank line between them they will read as the same block. So for now its worth noting that the header is not a part of the cell

@aviatesk
Copy link
Member

@wadethestealth
Oh so if I dispatch fold-current-cell on an header, the detected scope would be just an grammar of the body text (like markdown, pweave markdown or so) ?

Then I wonder we should disable the command on a body text of multi-grammar files including header.

@wadethestealth
Copy link
Member Author

wadethestealth commented Jun 14, 2019

Correct.

Also, You are totally right since markdown isn't considered a cell but more of a wrapper @aviatesk

@aviatesk
Copy link
Member

@wadethestealth
Okay. Anyway, let's put this to another PR/issue.

@aviatesk aviatesk merged commit 2d53a25 into nteract:master Jun 14, 2019
@wadethestealth wadethestealth deleted the fix-fold branch June 15, 2019 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 For unexpected issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug with folding current cell
2 participants