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

Better content hiding; template & testing improvements #734

Merged
merged 5 commits into from
Jan 23, 2018

Conversation

mpacer
Copy link
Member

@mpacer mpacer commented Jan 14, 2018

Closes #733.

It adds a test to make sure this behaviour does not occur again; I also tested for this explicitly in the html and AsciiDoc exporters (since their templates have additional prompt hiding logic).

I also improved indenting in some of the templates and fixed a bug in the logic for hiding input cells in the basic html template.

I removed some unnecessary conditions for hiding prompts in the html template.

NB: I made some changes to the AsciiDoc template in order to simplify its logic as well… but they ended up being substantial enough that I don't think they should be included in this context (especially since I don't have a functioning version of AsciiDoc on my comp; with it relying on python 2.6… and no later!). I'll make a PR with those changes at some point near in the future…but it definitely seems like the current template is broken considering how it strips space from output areas.

Copy link
Member

@takluyver takluyver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this makes sense to me. One suggestion inline.

out_regex = r"Out\[(.*)\]:"

assert not re.findall(in_regex, output)
assert not re.findall(out_regex, output)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to add a corresponding test that the in and out prompts are produced with the default config? It looks like we already have such tests for HTML and Latex, but not for asciidoc.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@mpacer mpacer added this to the 5.4 milestone Jan 23, 2018
@takluyver takluyver merged commit adf85ce into jupyter:master Jan 23, 2018
@takluyver
Copy link
Member

Great :-)

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.

--no-prompt removes code cells from LaTeX/pdf docs
2 participants