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

Projects
None yet
2 participants
@mpacer
Copy link
Member

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.

@takluyver
Copy link
Member

takluyver left a comment

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)

This comment has been minimized.

@takluyver

takluyver Jan 15, 2018

Member

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.

This comment has been minimized.

@mpacer

mpacer Jan 19, 2018

Author Member

Sure!

This comment has been minimized.

@mpacer

mpacer Jan 23, 2018

Author Member

done!

@mpacer mpacer added this to the 5.4 milestone Jan 23, 2018

@takluyver takluyver merged commit adf85ce into jupyter:master Jan 23, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@takluyver

This comment has been minimized.

Copy link
Member

takluyver commented Jan 23, 2018

Great :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment