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

annotate collapsed cells with 'echo=false' #293

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

JonasIsensee
Copy link
Contributor

@JonasIsensee JonasIsensee commented Mar 17, 2020

Hi there,

I noticed that so far weave and convert_doc ignored whether the jupyter notebook cell was collapsed or not.
This tiny PR annotates collapsed cells with echo=false during conversion to make sure that the source code will not show in the resulting markdown file.

Kind regards,
Jonas

PS: I don't care at all for these particular lines of code in case they don't fit your style.

@JonasIsensee
Copy link
Contributor Author

Tests pass on 1.3 and 1.4.
1.0 failed during setup and nightly throws this.

[ Info: Test: Weaving with Gadfly.jl

[ Info: Weaving chunk 1 from line 6

Unreachable reached at 0x7f98195a7913

signal (4): Illegal instruction

in expression starting at /home/travis/build/JunoLab/Weave.jl/test/gadfly_formats.jl:17

These failures seem unrelated.

@aviatesk
Copy link
Member

can you rebase this against master ?

@aviatesk
Copy link
Member

aviatesk commented Mar 20, 2020

I noticed that so far weave and convert_doc ignored whether the jupyter notebook cell was collapsed or not.
This tiny PR annotates collapsed cells with echo=false during conversion to make sure that the source code will not show in the resulting markdown file.

So maybe to collapse a cell, we need this Jupyter notebook extension right ?

src/readers.jl Outdated Show resolved Hide resolved
@JonasIsensee
Copy link
Contributor Author

I don't think this involves any extensions for jupyter.
Just to make sure, we're talking about the same thing:
This is what I mean by collapsed. I collapse them by clicking on the blue bar that appears when hovering over that region with the cursor.
2020-04-06-213059_1920x1080_scrot

@JonasIsensee
Copy link
Contributor Author

This additional commit adds an extra keyword
suppress_output to be used as julia; suppress_output=true
which does what it says.
It is used to do the same for jupyter notebooks when the output cells are collapsed.

@aviatesk
Copy link
Member

sorry for being so late to response, I will take a look on this again later 🙇

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